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)

Active 5 years ago
Joined Mar 2020
Points:
639

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
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

Active 4 months ago
Joined Jun 2019
Points:
2787

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3716
use nbt tags I think
Thu, 04/02/2020 - 01:56

use nbt tags I think

Active 5 years ago
Joined Mar 2020
Points:
639

User statistics:

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

No me sirve bro

Active 5 years ago
Joined Mar 2020
Points:
639

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
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

Active 4 years ago
Joined Mar 2020
Points:
651

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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.

Active 9 months ago
Joined Dec 2019
Points:
753

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 154
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