2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/SlotFurnaceResult.java
|
|
|
|
+++ b/net/minecraft/server/SlotFurnaceResult.java
|
2016-11-17 02:41:03 +01:00
|
|
|
@@ -1,5 +1,10 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.entity.Player;
|
|
|
|
+import org.bukkit.event.inventory.FurnaceExtractEvent;
|
|
|
|
+// CraftBukkit end
|
2016-11-17 02:41:03 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
public class SlotFurnaceResult extends Slot {
|
|
|
|
|
2016-11-17 02:41:03 +01:00
|
|
|
private final EntityHuman a;
|
|
|
|
@@ -51,6 +56,18 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
i = j;
|
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
|
2014-11-25 22:32:16 +01: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());
|
|
|
|
+
|
2015-12-19 20:04:58 +01:00
|
|
|
+ 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();
|
|
|
|
+ }
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit end
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
while (i > 0) {
|
|
|
|
j = EntityExperienceOrb.getOrbValue(i);
|
2015-02-26 23:41:06 +01:00
|
|
|
i -= j;
|