Skip to content

Commit

Permalink
fix: Removed Client-sided function call to blockEntity.block
Browse files Browse the repository at this point in the history
Now the block is recovered from the BlockState instead
  • Loading branch information
Zekromaster committed Aug 5, 2024
1 parent e36dae3 commit 79db916
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private sealed class TierUpgrade(identifier: Identifier, protected val destinati
if (canUpgrade(blockEntity)) {
val oldBlockState = world.getBlockState(x, y, z)
val oldContents = (blockEntity as ChestInventoryAccessor).inventory.copyOf()
val oldBlock = blockEntity.block
val oldBlock = oldBlockState.block

(blockEntity as ChestInventoryAccessor).inventory = arrayOfNulls(blockEntity.size())
world.setBlock(x, y, z, destination.getBlock().id)
Expand Down

0 comments on commit 79db916

Please sign in to comment.