From 1db8e21eb7f1be3d5e1cf83e0b658f57a1e57d15 Mon Sep 17 00:00:00 2001 From: lordIcocain <62835225+lordIcocain@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:18:34 +0200 Subject: [PATCH] Painted ME chest will not connect to different color ME chest/cable. (#623) Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com> --- src/main/java/appeng/tile/storage/TileChest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index 4e04091ca22..46df57563c1 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -413,6 +413,7 @@ public boolean readFromStream_TileChest(final ByteBuf data) { this.type = data.readByte() & 0b11; final AEColor oldPaintedColor = this.paintedColor; this.paintedColor = AEColor.values()[data.readByte()]; + this.getProxy().setColor(this.paintedColor); final int item = data.readInt(); @@ -433,6 +434,7 @@ public void readFromNBT_TileChest(final NBTTagCompound data) { this.priority = data.getInteger("priority"); if (data.hasKey("paintedColor")) { this.paintedColor = AEColor.values()[data.getByte("paintedColor")]; + this.getProxy().setColor(this.paintedColor); } } @@ -715,8 +717,11 @@ public boolean recolourBlock(final ForgeDirection side, final AEColor newPainted if (this.paintedColor == newPaintedColor) { return false; } - this.paintedColor = newPaintedColor; + this.getProxy().setColor(this.paintedColor); + if (getGridNode(side) != null) { + getGridNode(side).updateState(); + } this.markDirty(); this.markForUpdate(); return true;