-
This code is not working anything i did wrong?
I jsut wanna know why its broken
-
This code is not working anything i did wrong?
I did do that
-
This code is not working anything i did wrong?
Im gonna head to bed just right things you can help me with in here gn ill talk tommorow
-
This code is not working anything i did wrong?
and yes i added the classes
-
This code is not working anything i did wrong?
gave me a bunch of errors
-
This code is not working anything i did wrong?
there is PlayerInteractEvent.RightClickItem
-
This code is not working anything i did wrong?
I did @Overide OnItemRightClick and nothing shows up
-
This code is not working anything i did wrong?
So i do the event inside the item class?
-
This code is not working anything i did wrong?
1.16.4
-
Modifying Vanilla Loot Tables (1.16.4)
Btw its pretty recent to
-
Modifying Vanilla Loot Tables (1.16.4)
Watch this its how I started out coding
-
This code is not working anything i did wrong?
@SubscribeEvent public void OnRightClick(PlayerInteractEvent.RightClickItem RightClick) { LivingEntity player = RightClick.getEntityLiving(); if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } }
-
This code is not working anything i did wrong?
New Code: if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } P.S Still doesn't work
-
This code is not working anything i did wrong?
Btw i just added braces to it and it still did nothing
-
This code is not working anything i did wrong?
Im trying to detect when a player clicks with my item if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) player.setHealth(0); }
IPS spam blocked by CleanTalk.