Make a Mob that can only be hurt by specific Weapon

Started by Finmide on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a Mob that can only be hurt by specific Weapon

For a mod I am making a Vampire mob. But I want to make it so they can only be killed by a wooden tool of some kind.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, first, make the mob…
Tue, 01/26/2021 - 07:24

So, first, make the mob immune to all kinds of attacks.

Then make procedure with the entity attacked trigger and check if event/target entity is vampire. Check if item in item in main hand of source entity is frxmpl wooden sword, and if it is, deal x damage to event/target entity. It must be repeated for each wooden tool, but I hope it should work. I don't know any other way.

P.S. Sorry for my English if I have mistakes.