Skip to content

Commit

Permalink
Trigger a chunk rerender on soil change in the cloche
Browse files Browse the repository at this point in the history
  • Loading branch information
malte0811 committed Jan 4, 2024
1 parent 6d6c137 commit f1a6af1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit f1a6af1

Please sign in to comment.