summaryrefslogtreecommitdiffstats
path: root/nms-patches/SlotFurnaceResult.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/SlotFurnaceResult.patch')
-rw-r--r--nms-patches/SlotFurnaceResult.patch11
1 files changed, 6 insertions, 5 deletions
diff --git a/nms-patches/SlotFurnaceResult.patch b/nms-patches/SlotFurnaceResult.patch
index a098a820..cb27c684 100644
--- a/nms-patches/SlotFurnaceResult.patch
+++ b/nms-patches/SlotFurnaceResult.patch
@@ -11,7 +11,7 @@
public class SlotFurnaceResult extends Slot {
private EntityHuman a;
-@@ -50,6 +55,17 @@
+@@ -50,6 +55,18 @@
i = j;
}
@@ -20,10 +20,11 @@
+ TileEntityFurnace furnace = ((TileEntityFurnace) this.inventory);
+ org.bukkit.block.Block block = a.world.getWorld().getBlockAt(furnace.position.getX(), furnace.position.getY(), furnace.position.getZ());
+
-+ FurnaceExtractEvent event = new FurnaceExtractEvent(player, block, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(itemstack.getItem()), itemstack.count, i);
-+ a.world.getServer().getPluginManager().callEvent(event);
-+
-+ i = event.getExpToDrop();
++ if (b != 0) {
++ FurnaceExtractEvent event = new FurnaceExtractEvent(player, block, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(itemstack.getItem()), b, i);
++ a.world.getServer().getPluginManager().callEvent(event);
++ i = event.getExpToDrop();
++ }
+ // CraftBukkit end
+
while (i > 0) {