Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

zenglintao

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by zenglintao

  1. I often see the word Vanilla, but I don’t know what it is, can anyone tell me?
  2. public class MyItem extends Item { public MyItem() { super(new Properties().group(ItemGroup.MATERIALS)); } public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) { playerIn.sendMessage(); if (this.isFood()) { ItemStack itemstack = playerIn.getHeldItem(handIn); if (playerIn.canEat(this.getFood().canEatWhenFull())) { playerIn.setActiveHand(handIn); return ActionResult.resultConsume(itemstack); } else { return ActionResult.resultFail(itemstack); } } else { return ActionResult.resultPass(playerIn.getHeldItem(handIn)); } } } I override the onItemRightClick method in my item class
  3. public void sendMessage(ITextComponent component) { } It is an empty method, I don't know how to use it. ITextComponent is an interface
  4. What method is used to replace onLeftClickEntity in the new version of Forge?
  5. <image of vanilla code removed - diesieben07>
  6. Shouldn't you use a Player object to do that?
  7. I used the old version of Forge to write a simple item for sending messages, but I don’t know how to write these code in the new version of Forge.
  8. How does the 1.15x version of Forge send messages?
  9. Why do many method names change after forge upgrade, do I have to remember those method names again?
  10. https://wiki.mcjty.eu/modding/index.php?title=Main_Page This tutorial is more detailed than the official one, but it's video format, I prefer to read the documentation
  11. I have learned Java, but there are too few official examples
  12. This document is not detailed enough, there are too few examples
  13. How do you know how many methods Forge has and what they are used for?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.