Mercerenies / a-turtles-troll

Random Minecraft shenanigans
GNU General Public License v3.0
4 stars 2 forks source link

make angels spawn with random colored armor (code inside) #68

Closed EvanSkiStudios closed 2 years ago

EvanSkiStudios commented 2 years ago

Leather armor has a special tag that is a Decimal Value color code {Item:{id:"minecraft:leather_helmet",Count:1b,tag:{display:{color:11546130}}}}

using the spawning code for angles and what equipment they have, just give the leather armor a special rng decimal color code, doesnt have to be specials colors basically a mix of rgb to decimal

you could probably have a random range script that pulls a number between

Hex 000000 to Hex FFFFFF

or

Dec 0 to Dec 16777215

Decimal is a little weird with its values tho so I would recommend just a hex rng script

get 3 individual values from 00 to FF then combine them in order of RGB (not convert to RGB just order)

then convert the full thing to decimal and use that

so for example HEX B0 2E 12

DEC 11546130

NBT: {Item:{id:"minecraft:leather_helmet",Count:1b,tag:{display:{color:11546130}}}}

Boom thats just for a hat

do that 3 more times for unique color chestplate, leggings and boots

this should help I think https://papermc.io/javadocs/paper/1.13/org/bukkit/inventory/meta/LeatherArmorMeta.html#setColor-org.bukkit.Color- apparently you can use has codes? https://papermc.io/javadocs/paper/1.13/org/bukkit/Color.html#hashCode--

Mercerenies commented 2 years ago

Closed as of 02a7e5d 2022-05-16_14 22 03