Jump to content

Turnrp

Members
  • Posts

    57
  • Joined

  • Last visited

Recent Profile Visitors

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

Turnrp's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. I jsut wanna know why its broken
  2. Im gonna head to bed just right things you can help me with in here gn ill talk tommorow
  3. and yes i added the classes
  4. gave me a bunch of errors
  5. there is PlayerInteractEvent.RightClickItem
  6. I did @Overide OnItemRightClick and nothing shows up
  7. So i do the event inside the item class?
  8. Btw its pretty recent to
  9. Watch this its how I started out coding
  10. @SubscribeEvent public void OnRightClick(PlayerInteractEvent.RightClickItem RightClick) { LivingEntity player = RightClick.getEntityLiving(); if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } }
  11. New Code: if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } P.S Still doesn't work
  12. Btw i just added braces to it and it still did nothing
  13. Im trying to detect when a player clicks with my item if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) player.setHealth(0); }
×
×
  • Create New...

Important Information

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