summaryrefslogtreecommitdiffstats
path: root/nms-patches/SlotFurnaceResult.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/SlotFurnaceResult.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/SlotFurnaceResult.patch')
-rw-r--r--nms-patches/SlotFurnaceResult.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/nms-patches/SlotFurnaceResult.patch b/nms-patches/SlotFurnaceResult.patch
new file mode 100644
index 00000000..626529de
--- /dev/null
+++ b/nms-patches/SlotFurnaceResult.patch
@@ -0,0 +1,31 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/SlotFurnaceResult.java 2014-11-27 08:59:46.893421001 +1100
++++ src/main/java/net/minecraft/server/SlotFurnaceResult.java 2014-11-27 08:42:10.128850958 +1100
+@@ -1,5 +1,10 @@
+ package net.minecraft.server;
+
++// CraftBukkit start
++import org.bukkit.entity.Player;
++import org.bukkit.event.inventory.FurnaceExtractEvent;
++// CraftBukkit end
++
+ public class SlotFurnaceResult extends Slot {
+
+ private EntityHuman a;
+@@ -49,6 +54,17 @@
+
+ i = j;
+ }
++
++ // CraftBukkit start - fire FurnaceExtractEvent
++ Player player = (Player) a.getBukkitEntity();
++ 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();
++ // CraftBukkit end
+
+ while (i > 0) {
+ j = EntityExperienceOrb.getOrbValue(i);