Entity with Randomized Armor

Started by Timelord_10 on

Topic category: Help with modding (Java Edition)

Last seen on 21:06, 5. Jan 2022
Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity with Randomized Armor

I am currently working on a mod that would require a mob to have randomized armor. Originally, I planned to use the "set ___ in armor slot ___ of event/target entity" procedure block, in combination with a random variable and the "On Entity Initial Spawn" trigger, to accomplish this. Unfortunately, the aforementioned procedure block only works for player entities. The only solution I've found by looking through other similar -- albeit a little outdated -- forums was to "create a copy of the entity for every combination of the armor  that I would need, then just lower the spawn rates". This is not actually possible -- from a practical stand point -- as I would require around 81 different variants of this single mob Does anyone know of another way that would allow me to have a mob with randomized armors?

 

 

Any and all help would be appreciated!

(also: if I'm just being a total moron and their is some obvious solution that I missed, feel free to point it out)

(also also: I only know very basic java. If this requires custom coding, you may need to walk me through it)

Last seen on 00:03, 27. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do everything shown and you…
Thu, 08/13/2020 - 03:53

Do everything shown and you should be good.

For armor slot info:

Head slot:5

Chest slot:4

Legs slot:3

Feet slot:2

There are other ways to select the armor piece that will be Worn but this is the simplest.

EntitySetArmor

Last seen on 00:03, 27. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Keep in mind the reason for…
Thu, 08/13/2020 - 03:57

Keep in mind the reason for the while loop is because if you don't put it in the procedure it will set it to the armor you wanted but there is a chance that the game by vanilla will set it to something else after.

Basically the game can overwrite your choice in this situation without the while loop.

Last seen on 15:05, 6. Oct 2023
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*Armor Slots: 0f 1l 2c 3h
Sat, 08/15/2020 - 22:37

*Armor Slots: 0f 1l 2c 3h

Last seen on 02:57, 8. Apr 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i tried to do this, but i…
Tue, 09/01/2020 - 00:15

i tried to do this, but i can't put "Event/target entity" in "Get a Copy of Item slot _ of _ if it has inventory"

How do you put it there?

 

Last seen on 02:57, 8. Apr 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay nvm, i fixed it :)  
Mon, 09/21/2020 - 00:02

Okay nvm, i fixed it :)

 

Last seen on 06:04, 14. May 2023
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how'd you fix it? : )
Tue, 04/11/2023 - 01:26

how'd you fix it? : )