Make Piglin passive when wearing armor

Started by Drexel20 on

Topic category: Help with modding (Java Edition)

Last seen on 13:43, 6. Sep 2021
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

Last seen on 13:54, 28. Apr 2024
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.)

Last seen on 18:52, 28. Feb 2024
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.

Last seen on 13:54, 28. Apr 2024
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?

Last seen on 18:52, 28. Feb 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, for 2022.2 1.16.5.
Sun, 01/21/2024 - 18:01

Yeah, for 2022.2 1.16.5.