Make Piglin passive when wearing armor

Started by Drexel20 on Mon, 06/21/2021 - 11:51

Topic category: Help with modding (Java Edition)

Last seen on 18:46, 24. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make Piglin passive when wearing armor
Mon, 06/21/2021 - 11:51

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 18:46, 24. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for my bad English
Mon, 06/21/2021 - 11:51

Sorry for my bad English

Last seen on 09:15, 11. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Gonna bump this question, it…
Tue, 07/06/2021 - 07:02

Gonna bump this question, it seems like a pretty core feature to make mobs peaceful with armor on, so a Procedure using the new functionality would be appreciated.

Last seen on 07:33, 30. Jul 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I know it's not proper…
Tue, 07/06/2021 - 07:31

I know it's not proper solution, but you can use command giving effect to a certain radius while wearing the armour, and make procedure adding all entities under that effect to specific scoreboard team (and removing them when effect ends). Scoreboard teams make all entities within it being peaceful to themselves (including even creepers not exploding), so it's useful workaround for all not-coded changes of behaviours.

Last seen on 09:15, 11. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
use command giving effect to…
Tue, 07/06/2021 - 07:43

use command giving effect to a certain radius while wearing the armour, and make procedure adding all entities under that effect to specific scoreboard team

Very nice and simple workaround!

Last seen on 09:15, 11. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do you make that effect…
Tue, 07/06/2021 - 08:08

How do you make that effect only target Piglins? I have made it so currently EVERYTHING within the radius gets set to the same team as the wearer with
 

on the scoreboard of [Event/target entity]

(I'm new to MCreator but not new to coding)

Last seen on 09:15, 11. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I figured it out eventually,…
Tue, 07/06/2021 - 12:06

I figured it out eventually, but sadly I must confirm this workaround doesn't actually work. I thought I just messed up the Procedures my gear, but as it turns out being on the same teams as Piglins without gold on DOESN'T stop them from attacking you IN 1.16.5

In 1.17, being on the same team as Piglins and Brutes DOES stop them from attacking you, but NOT any version before.

Tested in Vanilla 1.16.5 by just manually adding Piglins and myself to a team through commands to make sure.

Last seen on 07:33, 30. Jul 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh, that's interesting. I…
Tue, 07/06/2021 - 15:26

Oh, that's interesting. I will try to test that myself I guess (was thinking about golden chainmail armour, so I have a reason for similar feature), but if it is as you say, then it's weird, considering there was no official bugs/fixes on that part, as far as I remember.

At least we know how to deal with that for 1.17, though ^^

Last seen on 09:15, 11. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Actually there was an…
Tue, 07/06/2021 - 18:09

Actually there was an official bug listing which did get (partially) fixed in 1.17 https://bugs.mojang.com/browse/MC-172304

That's how I knew I wasn't crazy after my testing lol

Your workaround would have been perfect, and it works great for something like a "Necromancer Chestplate" that would make Zombies or whatever passive, but it doesn't work for Piglins of all things.

I guess we need an MCreator update that natively supports the function MC uses to pacify Piglins with Gold, considering how useful that feature is; otherwise it's just raw code only.

Last seen on 07:33, 30. Jul 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh, so I wasn't aware of…
Tue, 07/06/2021 - 19:37

Oh, so I wasn't aware of that, thanks for the link. To be honest, when 1.16 was released, I rather watched HermitCraft than used MCreator, haha.

And yeah, I plan to use that scoreboard solution for several similar features, considering I'm working on magic mod now and this can come in handy ^^ but I will try to find other (non-code-related) solutions for Piglins anyway, since we all three need that. So if I find anything, I will let us know here.

Last seen on 04:34, 27. Jul 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes this
Wed, 07/07/2021 - 22:00

yes this