Started by
thxlotl
on
Topic category: Help with Minecraft modding (Java Edition)
I'm making a crab mob for my mod and I was thinking of making it only be able to take direct damage through getting hit by a wooden shovel (because it looks like a mallet)
i dont know if its possable but you could make it take no damage overall then add a procedure checking if the player attacked it
and had "wooden shovel" in mainhand then deal damage but i dont think this would work with sharpness if for some reason you had that on the shovel
Thanks I'll try that!
if ya run into more issues you can post a screenshot of the procedure and i can check it out
Create a procedure "On entity attacked" and check if the attacked entity is a Crab, and if yes check if the item in main-hand of the attacking entity is a Wooden Shovel. If not, cancel event that triggered global trigger.
It'll work with Sharpness and other damage changing effects such as Strentgh.
awesome thanks!