mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
a0b8b886c8
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
CraftBukkit Changes:
d5a72960
SPIGOT-6063: ConsoleSender sending extra lines in Java 13+
Spigot Changes:
2740d5ae Rebuild patches
43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Phoenix616 <mail@moep.tv>
|
|
Date: Wed, 10 Jun 2020 23:55:15 +0100
|
|
Subject: [PATCH] Inventory getHolder method without block snapshot
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
|
index 5e0180ac658db9d7c9d90fd3d3c4eddf6f34c90d..bba9bddc1c0aacade9b7ad56afb1e630caa078fc 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
|
@@ -526,6 +526,13 @@ public class CraftInventory implements Inventory {
|
|
return inventory.getOwner();
|
|
}
|
|
|
|
+ // Paper start - getHolder without snapshot
|
|
+ @Override
|
|
+ public InventoryHolder getHolder(boolean useSnapshot) {
|
|
+ return inventory instanceof net.minecraft.server.TileEntity ? ((net.minecraft.server.TileEntity) inventory).getOwner(useSnapshot) : getHolder();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public int getMaxStackSize() {
|
|
return inventory.getMaxStackSize();
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
|
|
index e917db0b01c2fef46a1ea873bee9aa25044de036..ad425d89bcae3045d0e35ecfb70a233895f88cc8 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
|
|
@@ -64,6 +64,13 @@ public class CraftInventoryDoubleChest extends CraftInventory implements DoubleC
|
|
return new DoubleChest(this);
|
|
}
|
|
|
|
+ // Paper start - getHolder without snapshot
|
|
+ @Override
|
|
+ public DoubleChest getHolder(boolean useSnapshot) {
|
|
+ return getHolder();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public Location getLocation() {
|
|
return getLeftSide().getLocation().add(getRightSide().getLocation()).multiply(0.5);
|