Started by
PoisonousPotato
on
Topic category: Help with Minecraft modding (Java Edition)
Help me, please?
I want that with your fists (hands) you can only break:
- Dirt, Sand and similar elements.
- Plants, Leaves, Lilypads and similar elements.
- Other weak blocks (i actually don't need to tell everything, because i will add to the code)
Here's an easy one that you can probably help.
I also want so that Glass, Glass Pane, Stained Glass, Stained Glass Pane and Tinted Glass will hurt you.
(and my custom Tinted Glass Pane, Uranium Glass and Uranium Glass Pane).
use the when block breaks global trigger and check what type of block it is. If its not one of those blocks, use the trigger cancel. Also if it checks for a block that hurts you, just damage the entity (you could use a custom damage type)