From f1a6af14e8db3dd52e1bc5d0f5cb1e2491e8da69 Mon Sep 17 00:00:00 2001 From: malte0811 Date: Thu, 4 Jan 2024 20:23:51 +0100 Subject: [PATCH] Trigger a chunk rerender on soil change in the cloche --- .../common/blocks/metal/ClocheBlockEntity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/ClocheBlockEntity.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/ClocheBlockEntity.java index 11f9288a54..a5771a3f4e 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/ClocheBlockEntity.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/ClocheBlockEntity.java @@ -303,6 +303,7 @@ public void receiveMessageFromServer(CompoundTag message) @Override public void readCustomNBT(CompoundTag nbt, boolean descPacket) { + final ItemStack oldSoil = inventory.get(SLOT_SOIL); dummy = nbt.getInt("dummy"); // loadAllItems skips empty items, so if a slot was emptied it won't be properly synced without the fill call Collections.fill(inventory, ItemStack.EMPTY); @@ -316,6 +317,8 @@ public void readCustomNBT(CompoundTag nbt, boolean descPacket) growth = nbt.getFloat("growth"); } renderBB = null; + if(descPacket&&level!=null&&!ItemStack.isSame(oldSoil, inventory.get(SLOT_SOIL))) + markContainingBlockForUpdate(null); } @Override