Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. If I understood correctly, you can try looking up and overriding Block#getSubBlocks and Item#getSubItem. Make sure you set Item#setHasSubtypes and Block#setHasSubtypes to true though.
  2. You are trying to load mods for 1.12.2 on Minecraft 1.13.2. This will not work, as mods are designed for specific version of Minecraft. Download the 1.13.2 version of the mods instead.
  3. Don't put it in the IRecipe registry event; put it in something like the post init instead.
  4. You cannot manipulate the player’s inventory on the client side. Send a packet to the server when the button is clicked and perform the inventory editing on the server.
  5. Yes. Do something similar to that. (that was terribly explained, sorry) I meant you should do something logically similar: iterate through the list of recipes and remove the recipe if it matches certain criteria.
  6. Thanks. I assume that means I cannot run client-only code in display name related method? I am wondering if I can use the client side "I18n" in Item#getItemStackDisplayName.
  7. Is Item#getItemStackDisplayName, or display name related methods, client side only? My current guess is yes; however, I am rather uncertain due to the absence of @SideOnly annotations on such methods.
  8. Sorry, 1.7.10 is no longer supported on this forum due to its age. Consider updating to a modern version of Minecraft to receive support.
  9. Remove Fexcraft and try again. Also, where are you getting your mods?
  10. This should be basic Java. If you do not know how to pass objects as parameters, then I'm afraid you are not ready to make a mod. Learn Java first.
  11. It is possible to install different versions of forge. You can delete a version of forge by going to the version folder in your Minecraft path and delete the corresponding version.
  12. Why do you need another class for the cool down? Just store the cool down value in the NBTTag of the stack or something. Alternatively, you can get the meta from the stack and pass it to methods in the other class.
  13. I'm not going to write your code for you, as you won't learn that way. If you want your repair gem to repair items while the gem is in the player's inventory, you will probably need to override Item#onUpdate, which is defined as: public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) See the ItemStack in the parameter? You should use that stack instead of creating a new one, so you should call stack.getMetaData() on that ItemStack.
  14. Yes basically (I posted the wrong method). Don't obtain the ItemStack in such a way though; use the one that is passed in.
  15. 1. Use Item#getMetadata Stack#getMetadata and pass in the ItemStack you want to check. 2. Your else ifs are rather messy and unnecessary. Use math to generalize the relationship between tiers and cool downs. 3. If you are talking about this: https://minecraft.curseforge.com/projects/repair-gem, then I am making it baubles compatible (I almost forgot about that mod...).
  16. I wouldn't recommend doing that. The admin kicks the player for a reason, and the player should reflect on what he did wrong before rejoining the server. Auto-rejoining might potentially result in a ban.
  17. Iterate through player.inventory and record the index when the ItemStack is what you want. Hint (pseudocode) : EDIT: Just realized that this is already solved...
  18. What you are asking to do is very specific, thus I doubt there will be any tutorials out there. However, mods like MeeCreep do have entities that chop trees; I would suggest checking out its source: https://github.com/McJtyMods/MeeCreeps.
  19. Please elaborate. No.. Create a server, and players who can reach the server can join it.
  20. This indicates that you are not so familiar with how methods and methods signatures work in Java. I would recommend to look up tutorials or explanations on method signatures and overriding in Java.
  21. I thought your main problem was fixed... If you want to implement the behavior on a custom item, just override Item#onItemUse.
  22. In this case you should just map each color to a block; there is no need for strings. Something like Map<Color, Block> should suffice.
  23. Sorry, but your clarification is slightly ambiguous. What do you mean by "spawn an image"?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.