Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit ce95b5d653 - Show all commits

View File

@@ -58,13 +58,13 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
public Color getBackgroundColor() { public Color getBackgroundColor() {
int color = this.getHandle().getBackgroundColor(); int color = this.getHandle().getBackgroundColor();
return (color == -1) ? null : Color.fromARGB(color); return color == Display.TextDisplay.INITIAL_BACKGROUND ? null : Color.fromARGB(color);
} }
@Override @Override
public void setBackgroundColor(Color color) { public void setBackgroundColor(Color color) {
if (color == null) { if (color == null) {
this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, -1); this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, Display.TextDisplay.INITIAL_BACKGROUND);
} else { } else {
this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, color.asARGB()); this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, color.asARGB());
} }