Topic category: Help with Minecraft modding (Java Edition)
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)
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.
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.
*Armor Slots: 0f 1l 2c 3h
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?
Okay nvm, i fixed it :)
how'd you fix it? : )