From 9b4ddafa608b3dec9585decb0622b5b1a5658747 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
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/LootTable-API.patch                  | 8 ++++----
 Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch | 3 ++-
 work/Bukkit                                             | 2 +-
 work/CraftBukkit                                        | 2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/Spigot-API-Patches/LootTable-API.patch b/Spigot-API-Patches/LootTable-API.patch
index 3c154a80cc..26e3f8397a 100644
--- a/Spigot-API-Patches/LootTable-API.patch
+++ b/Spigot-API-Patches/LootTable-API.patch
@@ -245,8 +245,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  /**
   * 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.
@@ -318,8 +318,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  /**
   * 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/Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch
index 3c82f242b6..0c44929716 100644
--- a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch
+++ b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch
@@ -77,6 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
          this.b = this.a;
          float f = 0.1F;
  
+@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
          if (this.viewingCount > 0 && this.a == 0.0F) {
              this.a(SoundEffects.BLOCK_CHEST_OPEN);
          }
@@ -106,7 +107,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 @@ -0,0 +0,0 @@ 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);
  
diff --git a/work/Bukkit b/work/Bukkit
index bd45a2f11d..eeb1042f1a 160000
--- a/work/Bukkit
+++ b/work/Bukkit
@@ -1 +1 @@
-Subproject commit bd45a2f11d5297104482d86101fcbe9983051b2e
+Subproject commit eeb1042f1ac356cc989dd1c4e35b37ee0ab93891
diff --git a/work/CraftBukkit b/work/CraftBukkit
index c3a22e7850..8fb65851f1 160000
--- a/work/CraftBukkit
+++ b/work/CraftBukkit
@@ -1 +1 @@
-Subproject commit c3a22e7850f7b6c41163676a154b22c61952b2a9
+Subproject commit 8fb65851f12f78c26ca979377370395e64c8a61f