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

Started by Jerson123 on Wed, 04/01/2020 - 18:14

Topic category: Help with modding

Last seen on 03:23, 11. Apr 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
How can I create a hostile mob that can only be killed with a specific weapon
Wed, 04/01/2020 - 18:14

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

Last seen on 14:17, 26. May 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
use nbt tags I think
Thu, 04/02/2020 - 01:56

use nbt tags I think

Last seen on 03:23, 11. Apr 2020
Joined Mar 2020
User points:

User statistics:

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

No me sirve bro

Last seen on 03:23, 11. Apr 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 09:55, 22. Apr 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 14:07, 26. May 2020
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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