Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/27/22 in all areas

  1. Why aren't you just overriding Item.useOn() in your item? e.g. see DebugStickItem.useOn() The answer to your direct question is pretty trivial @Mod.EventBusSubscriber(modid = MODID) public class ModEvents { @SubscribeEvent public static void rightClickBlock(RightClickBlock event) { if (event.getItemStack().is(MY_ITEM.get())) { BlockState state = event.getLevel().getBlockState(event.getPos()); Block block = state.getBlock(); // etc. } } }
    1 point
  2. What a brilliant, topical, and educated guess; https://ibb.co/ccFVzL8. EDIT: Oh and forgot to mention useful to the thread.
    1 point
×
×
  • Create New...

Important Information

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