aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch
diff options
context:
space:
mode:
authorKyle Wood <[email protected]>2021-04-24 17:01:33 -0500
committerKyle Wood <[email protected]>2021-04-25 18:37:43 -0500
commit3093b81fee3064603c368ab934eddf66ce304433 (patch)
treecb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch
parent1af696a05d21cbdd7b5a7170f95598c013257588 (diff)
downloadPaper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz
Paper-3093b81fee3064603c368ab934eddf66ce304433.zip
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch b/Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch
new file mode 100644
index 0000000000..00f9b23e6f
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0553-Don-t-require-FACING-data.patch
@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mariell Hoversholm <[email protected]>
+Date: Sun, 23 Aug 2020 19:01:04 +0200
+Subject: [PATCH] Don't require FACING data
+
+
+diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseBehaviorItem.java b/src/main/java/net/minecraft/core/dispenser/DispenseBehaviorItem.java
+index 979b862284ecd0dc504ee8a7018b27ff569b7b85..3d14ec72bb9babdf6b24aca3bde06d8b54815f9d 100644
+--- a/src/main/java/net/minecraft/core/dispenser/DispenseBehaviorItem.java
++++ b/src/main/java/net/minecraft/core/dispenser/DispenseBehaviorItem.java
+@@ -15,20 +15,22 @@ import org.bukkit.event.block.BlockDispenseEvent;
+ // CraftBukkit end
+
+ public class DispenseBehaviorItem implements IDispenseBehavior {
++ private EnumDirection enumdirection; // Paper
+
+ public DispenseBehaviorItem() {}
+
+ @Override
+ public final ItemStack dispense(ISourceBlock isourceblock, ItemStack itemstack) {
++ enumdirection = isourceblock.getBlockData().get(BlockDispenser.FACING); // Paper - cache facing direction
+ ItemStack itemstack1 = this.a(isourceblock, itemstack);
+
+ this.a(isourceblock);
+- this.a(isourceblock, (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING));
++ this.a(isourceblock, enumdirection); // Paper - cache facing direction
+ return itemstack1;
+ }
+
+ protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) {
+- EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING);
++ // Paper - cached enum direction
+ IPosition iposition = BlockDispenser.a(isourceblock);
+ ItemStack itemstack1 = itemstack.cloneAndSubtract(1);
+