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


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

zenglintao's Achievements

Tree Puncher

Tree Puncher (2/8)



  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.
  • Create New...

Important Information

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