mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/SlotFurnaceResult.java 2014-11-28 17:43:43.377707429 +0000
|
|
+++ src/main/java/net/minecraft/server/SlotFurnaceResult.java 2014-11-28 17:38:20.000000000 +0000
|
|
@@ -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);
|