Paper/Remapped-Spigot-Server-Patches/0657-Fix-console-spam-when-removing-chests-in-water.patch
2021-06-11 13:56:17 +02:00

20 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
Date: Thu, 19 Nov 2020 02:07:10 +0000
Subject: [PATCH] Fix console spam when removing chests in water
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
index 6b95cd2e2af66eef324dfcc8f7642da2f9e39d4e..d061548b5490f441b91a2dd90e7668a05f7f2112 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
@@ -239,7 +239,7 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
@Override
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
if (!state.is(newState.getBlock())) {
- BlockEntity tileentity = world.getBlockEntity(pos);
+ BlockEntity tileentity = world.getTileEntity(pos, false); // Paper - Don't validate TE - Fix console spam when removing chests in water
if (tileentity instanceof Container) {
Containers.dropContents(world, pos, (Container) tileentity);