how do you make it so your fist can only break leaves and plants

Started by mozemalik on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do you make it so your fist can only break leaves and plants
Fri, 12/06/2024 - 21:28 (edited)

im trying to make a hard survival mod for me and my friends i just dont know how to do this

Edited by mozemalik on Fri, 12/06/2024 - 21:28
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Set global trigger to "A…
Sat, 12/07/2024 - 01:38

Set global trigger to "A block is broken"

 

if entity/target in survival && item in main-hand of entity/target = air && item in off-hand of entity/target + air
     do Cancel event trigger



I did air in main/off hand, but you might be able to use empty itemstack instead. If you want that player to be able to break certain blocks, just add it to the if clause. Say if not leaves XOR rose XOR lilly, do this.

 

There might be an nbt tag for plants, but I'm not sure. You might have to manually add them or something. Hopefully you can find an easier solution for that.