Update handling of sign color/glow for 1.20 (#3835)

This commit is contained in:
Konicai 2023-06-08 16:30:25 -04:00 committed by GitHub
parent 6791acd215
commit 4cd472906c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,13 +133,13 @@ public class SignBlockEntityTranslator extends BlockEntityTranslator {
builder.putString("Text", signText.toString()); builder.putString("Text", signText.toString());
// Java Edition 1.14 added the ability to change the text color of the whole sign using dye // Java Edition 1.14 added the ability to change the text color of the whole sign using dye
Tag color = signData.get("Color"); Tag color = signData.get("color");
if (color != null) { if (color != null) {
builder.putInt("SignTextColor", getBedrockSignColor(color.getValue().toString())); builder.putInt("SignTextColor", getBedrockSignColor(color.getValue().toString()));
} }
// Glowing text // Glowing text
boolean isGlowing = getOrDefault(signData.get("GlowingText"), (byte) 0) != (byte) 0; boolean isGlowing = getOrDefault(signData.get("has_glowing_text"), (byte) 0) != (byte) 0;
builder.putBoolean("IgnoreLighting", isGlowing); builder.putBoolean("IgnoreLighting", isGlowing);
return builder.build(); return builder.build();
} }