2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/SlotFurnaceResult.java
|
|
|
|
+++ b/net/minecraft/server/SlotFurnaceResult.java
|
2014-11-26 05:32:16 +08:00
|
|
|
@@ -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;
|
2015-02-27 06:41:06 +08:00
|
|
|
@@ -50,6 +55,17 @@
|
2014-11-26 05:32:16 +08:00
|
|
|
i = j;
|
|
|
|
}
|
2015-02-27 06:41:06 +08:00
|
|
|
|
2014-11-26 05:32:16 +08:00
|
|
|
+ // 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
|
2015-02-27 06:41:06 +08:00
|
|
|
+
|
2014-11-26 05:32:16 +08:00
|
|
|
while (i > 0) {
|
|
|
|
j = EntityExperienceOrb.getOrbValue(i);
|
2015-02-27 06:41:06 +08:00
|
|
|
i -= j;
|