From 0b33230f2db4013d929b4b2e93b74ea57592a6d6 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Wed, 29 Jul 2020 21:50:16 +0200 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: eeb1042f #491: Add support to change block's lid state CraftBukkit Changes: 8fb65851 #660: Add support to change block's lid state --- Spigot-API-Patches/0035-LootTable-API.patch | 12 ++++++------ .../0022-Optimize-TileEntity-Ticking.patch | 15 ++++++++------- ...able-API-Replenishable-Lootables-Feature.patch | 4 ++-- ...-Allow-chests-to-be-placed-with-NBT-data.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Spigot-API-Patches/0035-LootTable-API.patch b/Spigot-API-Patches/0035-LootTable-API.patch index 07d278e11..8c3b9e180 100644 --- a/Spigot-API-Patches/0035-LootTable-API.patch +++ b/Spigot-API-Patches/0035-LootTable-API.patch @@ -230,7 +230,7 @@ index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1 + } +} diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java -index c67d711010304d7d2da60a22b845273aa911b5e9..a569c7b630bb0a09303d4e398a9d2a1aa2937dc8 100644 +index b451191312e4fb19f2131c2d0a0c0337953f6c7c..db6affbc78106b2d93b41953b624a0bca0ca1d72 100644 --- a/src/main/java/org/bukkit/block/Chest.java +++ b/src/main/java/org/bukkit/block/Chest.java @@ -1,5 +1,7 @@ @@ -245,8 +245,8 @@ index c67d711010304d7d2da60a22b845273aa911b5e9..a569c7b630bb0a09303d4e398a9d2a1a /** * Represents a captured state of a chest. */ --public interface Chest extends Container, Lootable { -+public interface Chest extends Container, LootableBlockInventory { // Paper +-public interface Chest extends Container, Lootable, Lidded { ++public interface Chest extends Container, LootableBlockInventory, Lidded { // Paper /** * Gets the inventory of the chest block represented by this block state. @@ -304,7 +304,7 @@ index 58e493099810fb8d4705ecd49b4a5e1e1949b87b..7ade312f180b7e30871d3a3240c76325 -public interface Hopper extends Container, Lootable { } +public interface Hopper extends Container, LootableBlockInventory { } // Paper diff --git a/src/main/java/org/bukkit/block/ShulkerBox.java b/src/main/java/org/bukkit/block/ShulkerBox.java -index 938f9aead43124ed607db7b423aa3b3a0c59d56d..42f5b4ea38cac418a18c2c8215986f2617a52f3e 100644 +index 2ab26605814c0745ddb0836b2b3618a5b9251ab7..172f383fea619127324fec2b043639fd0683f135 100644 --- a/src/main/java/org/bukkit/block/ShulkerBox.java +++ b/src/main/java/org/bukkit/block/ShulkerBox.java @@ -1,5 +1,6 @@ @@ -318,8 +318,8 @@ index 938f9aead43124ed607db7b423aa3b3a0c59d56d..42f5b4ea38cac418a18c2c8215986f26 /** * Represents a captured state of a ShulkerBox. */ --public interface ShulkerBox extends Container, Lootable { -+public interface ShulkerBox extends Container, LootableBlockInventory { // Paper +-public interface ShulkerBox extends Container, Lootable, Lidded { ++public interface ShulkerBox extends Container, LootableBlockInventory, Lidded { // Paper /** * Get the {@link DyeColor} corresponding to this ShulkerBox diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index 0b5321647..90e6dc29e 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -42,7 +42,7 @@ index 1441d096d44ea653539ba20ccda94eb62ffc32df..b9d0d2d42850c3a5d093429cd0d02ac4 protected static final VoxelShape f = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 16.0D); protected static final VoxelShape g = Block.a(0.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986d70309d2 100644 +index 0a22bdbac4c627502e609166590a3936f3372161..47ed08c414dca46720a3d4808ea71f999232e70c 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -54,7 +54,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986 private NonNullList items; protected float a; -@@ -84,22 +84,31 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -85,14 +85,20 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { return nbttagcompound; } @@ -77,6 +77,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986 this.b = this.a; float f = 0.1F; +@@ -106,8 +112,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { if (this.viewingCount > 0 && this.a == 0.0F) { this.a(SoundEffects.BLOCK_CHEST_OPEN); } @@ -89,7 +90,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986 float f1 = this.a; if (this.viewingCount > 0) { -@@ -115,8 +124,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -123,8 +132,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { float f2 = 0.5F; if (this.a < 0.5F && f1 >= 0.5F) { @@ -103,15 +104,15 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986 if (this.a < 0.0F) { this.a = 0.0F; -@@ -155,6 +167,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -163,6 +175,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { } - private void a(SoundEffect soundeffect) { + public void a(SoundEffect soundeffect) { // PAIL private -> public, rename playSound + if (!this.getBlock().b(BlockChest.c)) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074 BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c); if (blockpropertychesttype != BlockPropertyChestType.LEFT) { -@@ -193,6 +206,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -201,6 +214,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { ++this.viewingCount; if (this.world == null) return; // CraftBukkit @@ -119,7 +120,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986 // CraftBukkit start - Call redstone event if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) { -@@ -215,6 +229,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -223,6 +237,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { --this.viewingCount; // CraftBukkit start - Call redstone event diff --git a/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch index 4d4a96b88..d6abf7a8d 100644 --- a/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch @@ -669,10 +669,10 @@ index da5a80267b189d75374375211a574ca5f18d96be..26cc40e57f5b73b9c32859bff37c4a3d } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -index 6beb992622ba90dd37159124107b48426e5d7776..019fa71181ade0037598ace6288db587d16b5179 100644 +index 941cb98cc2c736e66af61171429243c484ceffc2..31585e9bb825fbd84e30b7c026da57734a3698b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -@@ -11,8 +11,9 @@ import org.bukkit.craftbukkit.CraftWorld; +@@ -12,8 +12,9 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest; import org.bukkit.inventory.Inventory; diff --git a/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch index 17727ec59..dc47e3b32 100644 --- a/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch @@ -17,10 +17,10 @@ index 95dc7e4a604e613751eb16b127e3203027c8c26d..dea478d4790be0c0d6e14cd7673d161a for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index a016d97be93c4218136f803cc9a7f986d70309d2..f6f2743892b5b933e6ba0cc25b24e0d471b305c9 100644 +index 47ed08c414dca46720a3d4808ea71f999232e70c..17498eae50560fd26402a2e7032fe94eb924989b 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java -@@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -300,7 +300,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic // CraftBukkit start @Override public boolean isFilteredNBT() { diff --git a/work/Bukkit b/work/Bukkit index bd45a2f11..eeb1042f1 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit bd45a2f11d5297104482d86101fcbe9983051b2e +Subproject commit eeb1042f1ac356cc989dd1c4e35b37ee0ab93891 diff --git a/work/CraftBukkit b/work/CraftBukkit index c3a22e785..8fb65851f 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit c3a22e7850f7b6c41163676a154b22c61952b2a9 +Subproject commit 8fb65851f12f78c26ca979377370395e64c8a61f