Right click command? How to code RightClick event for Modded Blocks

Started by crimson_fluff on

Topic category: Help with modding (Java Edition)

Last seen on 11:02, 30. Jun 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right click command? How to code RightClick event for Modded Blocks

So Ive made a multitool in 1.14. When I right click a tree I want it to strip it like the axe does in Minecraft 1.14

Now I understand I could code it like:

If RightClickOnBlock Then

   If BlockIs OakWood then ReplaceBlock with OakStripped
   If BlockIs SpruceWood then ReplaceBlock with SpruceStripped

But I want to code for modded blocks.  SO is there a way I can send a Right Click command and let Minecraft/Java figure out what to do?  How would I strip BiomesOPlenty logs?  Or do I really have to code for every Wood block type?

Modded blocks have right…
Sat, 11/16/2019 - 12:24

Modded blocks have right click trigger on themselves too so no need to use global trigger for this.

Last seen on 11:02, 30. Jun 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So If I use the…
Sat, 11/16/2019 - 19:45

So If I use the RightClickOnBlock event for my Multitool, How do I tell Minecraft to auto strip Logs? 

At the moment I code it the long way: If ClickedBlock is Oak then Replace with OakStrippedLog

Can I make this automatic, so that the RightClick passes to the Mod owner of the block clicked?  This way it would support rightclicking modded blocks like BiomesOPlenty,

Be gentle, Im new to modding Minecraft