Detect when stripping logs

Started by AdiDK on Fri, 04/22/2022 - 15:58

Topic category: Help with modding (Java Edition)

Last seen on 12:35, 30. Apr 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Detect when stripping logs
Fri, 04/22/2022 - 15:58

I want to make stuff happen when you strip a log, so I made a 'Player right clicks block' event, and made it check if the block is any strippable log, and if the player is holding an axe.

Problem is you can also strip logs with an axe in your off-hand, but it also sometimes doesn't strip the log if you're holding specific things in your main-hand, like blocks, food, potions, ender pearls, and other stuff, so you can't just check if there's an axe in your main-hand or your off-hand.

I've been trying to figure out how to do this for a while. I just started using mcreator today so I'm pretty new, and don't know if it's even possible to do this, or if there's a better way to do stuff.