Entity with Randomized Armor

Started by Timelord_10 on Mon, 08/10/2020 - 20:00

Topic category: Help with modding (Java Edition)

Last seen on 20:38, 15. Aug 2020
Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Entity with Randomized Armor
Mon, 08/10/2020 - 20:00

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 21:51, 20. Aug 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 21:51, 20. Aug 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 20:23, 27. Nov 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Okay nvm, i fixed it :)  
Mon, 09/21/2020 - 00:02

Okay nvm, i fixed it :)