How can I create a hostile mob that can only be killed with a specific weapon

Started by Jerson123 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I create a hostile mob that can only be killed with a specific weapon

for example creating a creeper that can only be damaged with the diamond sword, and when hitting it with another weapon such as the iron sword or the gold sword, or the wooden sword, etc. it does not suffer any damage

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No me sirve bro
Fri, 04/03/2020 - 01:03

No me sirve bro

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it does not help me, I would…
Fri, 04/03/2020 - 14:48

it does not help me, I would like you to tell me the specific procedure of how to make a mod only die with a specific article

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure, but I think…
Fri, 04/03/2020 - 16:09

I'm not sure, but I think you could make the entity invisible to player attacks in general. For your item, you create a procedure in the "when mob is hit with item" section where you make it so it deals with damage to the provided entity.

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think do when The entity…
Sat, 04/04/2020 - 20:32

I think do when The entity is hurt then check if the player has your own sword then heal up to max if it wasn't the right sword