blob: 626529dee6cbf566add321ef6f1c5cbc86aee8e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
|