899bc53b79
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: f47abd88 SPIGOT-6242: Fix some file line endings de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable CraftBukkit Changes: 4475707d SPIGOT-6244: /spawnpoint ignores angle 8b3b096d SPIGOT-6242: Fix some file line endings 4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent results in a "Unable to summon entity due to duplicate UUIDs" error 2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
36 Zeilen
1.7 KiB
Diff
36 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
Date: Sun, 23 Aug 2020 19:01:04 +0200
|
|
Subject: [PATCH] Don't require FACING data
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorItem.java b/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
|
|
index ca5eae350b971e93df708a29c426609423645430..40ac372281ba19cb776c14ffc957481367148f27 100644
|
|
--- a/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
|
|
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
|
|
@@ -7,20 +7,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);
|
|
|