diff options
author | Jake Potrebic <[email protected]> | 2021-07-20 18:42:33 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-21 01:42:33 +0000 |
commit | 0a2be0cbac730a90d5e601af799fb4d1cfc4e732 (patch) | |
tree | c7cbe7b799912d3165efaa9302130fc4e45a2b2b | |
parent | 4615f58a70749b3b35d2dbc10a5526f5f4482161 (diff) | |
download | Paper-0a2be0cbac730a90d5e601af799fb4d1cfc4e732.tar.gz Paper-0a2be0cbac730a90d5e601af799fb4d1cfc4e732.zip |
Skip TE break validation for some waterlogged TEs (#5741)
-rw-r--r-- | Spigot-Server-Patches/0657-Fix-console-spam-when-removing-chests-in-water.patch | 19 | ||||
-rw-r--r-- | Spigot-Server-Patches/0657-Skip-TE-break-validation-for-some-waterlogged-TEs.patch | 32 |
2 files changed, 32 insertions, 19 deletions
diff --git a/Spigot-Server-Patches/0657-Fix-console-spam-when-removing-chests-in-water.patch b/Spigot-Server-Patches/0657-Fix-console-spam-when-removing-chests-in-water.patch deleted file mode 100644 index d05dbe7aff..0000000000 --- a/Spigot-Server-Patches/0657-Fix-console-spam-when-removing-chests-in-water.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: HexedHero <[email protected]> -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/BlockChest.java b/src/main/java/net/minecraft/world/level/block/BlockChest.java -index b2c29cff5883868cb56a4e376ab946ac929abc94..a45ee959f41e7f349ff2c309f21fa44ec671cb87 100644 ---- a/src/main/java/net/minecraft/world/level/block/BlockChest.java -+++ b/src/main/java/net/minecraft/world/level/block/BlockChest.java -@@ -239,7 +239,7 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I - @Override - public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { - if (!iblockdata.a(iblockdata1.getBlock())) { -- TileEntity tileentity = world.getTileEntity(blockposition); -+ TileEntity tileentity = world.getTileEntity(blockposition, false); // Paper - Don't validate TE - Fix console spam when removing chests in water - - if (tileentity instanceof IInventory) { - InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity); diff --git a/Spigot-Server-Patches/0657-Skip-TE-break-validation-for-some-waterlogged-TEs.patch b/Spigot-Server-Patches/0657-Skip-TE-break-validation-for-some-waterlogged-TEs.patch new file mode 100644 index 0000000000..5afdaebd1c --- /dev/null +++ b/Spigot-Server-Patches/0657-Skip-TE-break-validation-for-some-waterlogged-TEs.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: HexedHero <[email protected]> +Date: Thu, 19 Nov 2020 02:07:10 +0000 +Subject: [PATCH] Skip TE break validation for some waterlogged TEs + + +diff --git a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java +index 21baa8fb99b0587da503e14e2b04abf3134d03bc..ba2385a876e7d77bc253d98307f1c75ec8aeb46c 100644 +--- a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java ++++ b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java +@@ -98,7 +98,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged + @Override + public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { + if (!iblockdata.a(iblockdata1.getBlock())) { +- TileEntity tileentity = world.getTileEntity(blockposition); ++ TileEntity tileentity = world.getTileEntity(blockposition, !iblockdata1.isSameInstance(Blocks.WATER)); // Don't validate TE when removing campfire in water + + if (tileentity instanceof TileEntityCampfire) { + InventoryUtils.a(world, blockposition, ((TileEntityCampfire) tileentity).getItems()); +diff --git a/src/main/java/net/minecraft/world/level/block/BlockChest.java b/src/main/java/net/minecraft/world/level/block/BlockChest.java +index b2c29cff5883868cb56a4e376ab946ac929abc94..219950a446ef5811b113b32158852def964234a4 100644 +--- a/src/main/java/net/minecraft/world/level/block/BlockChest.java ++++ b/src/main/java/net/minecraft/world/level/block/BlockChest.java +@@ -239,7 +239,7 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I + @Override + public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { + if (!iblockdata.a(iblockdata1.getBlock())) { +- TileEntity tileentity = world.getTileEntity(blockposition); ++ TileEntity tileentity = world.getTileEntity(blockposition, !iblockdata1.isSameInstance(Blocks.WATER)); // Paper - Don't validate TE - Fix console spam when removing chests in water + + if (tileentity instanceof IInventory) { + InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity); |