Make Piglin passive when wearing armor

Started by Drexel20 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make Piglin passive when wearing armor

I'm a new modder, and I'm making a mod that includes a new type of golden armor, and I want to make it so that when the player wears the armor, piglins become passive, I don't know how, I don't know if that's possible, please help

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...Sorry- just to clarify,…
Fri, 08/05/2022 - 15:13

...Sorry- just to clarify, you need to import a Living Entity, (The Itemstack should already be imported), as follows:

  • import net.minecraft.world.entity.LivingEntity

And then make sure you import the same Override for each piece of armor. (There should be four different sections, one for each piece.)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mindthemoods, can you…
Sun, 01/21/2024 - 01:53

Mindthemoods, can you provide how the code should look? I would truly appreciate it; hope you have a great day/night.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can- but I also just…
Sun, 01/21/2024 - 15:22

I can- but I also just realized if you're using 2023.4, there's now a built-in option for this when you're creating armor. Do you specifically need it for an older version?

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how did you make it work? I…
Wed, 10/02/2024 - 07:15

how did you make it work? I keep getting compile errors