mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-12-08 05:04:06 +00:00
parent
7bd46b4528
commit
7fa0529ed4
1 changed files with 9 additions and 2 deletions
|
|
@ -756,7 +756,14 @@ function generateArmorItems() {
|
||||||
const element = $(`#${armorID.substring(8) + "_color"}`);
|
const element = $(`#${armorID.substring(8) + "_color"}`);
|
||||||
const color = getDecimalRGB(element.css("background-color"));
|
const color = getDecimalRGB(element.css("background-color"));
|
||||||
|
|
||||||
if (mcVersion >= MC_VERSION.v1_20_5) {
|
if (mcVersion >= MC_VERSION.v1_21_5) {
|
||||||
|
// In 1.21.5+, the format has now changed
|
||||||
|
// dyed_color={rgb:12345}] -> dyed_color=12345
|
||||||
|
// It can also be in the RGB array format: dyed_color=[0.5, 1.0, 0.2]
|
||||||
|
data.components = {
|
||||||
|
dyed_color: color
|
||||||
|
};
|
||||||
|
} else if (mcVersion >= MC_VERSION.v1_20_5) {
|
||||||
data.components = {
|
data.components = {
|
||||||
dyed_color: { rgb: color }
|
dyed_color: { rgb: color }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue