Archiviert
13
0

[BUKKIT-3451] Use correct item amount for FurnaceExtractEvent.

Also don't call FurnaceExtractEvent when the item amount is 0.
Dieser Commit ist enthalten in:
hibo98 2015-12-19 20:04:58 +01:00 committet von md_5
Ursprung efe04b82b2
Commit 3f3c65f471

Datei anzeigen

@ -11,7 +11,7 @@
public class SlotFurnaceResult extends Slot { public class SlotFurnaceResult extends Slot {
private EntityHuman a; private EntityHuman a;
@@ -50,6 +55,17 @@ @@ -50,6 +55,18 @@
i = j; i = j;
} }
@ -20,10 +20,11 @@
+ TileEntityFurnace furnace = ((TileEntityFurnace) this.inventory); + TileEntityFurnace furnace = ((TileEntityFurnace) this.inventory);
+ org.bukkit.block.Block block = a.world.getWorld().getBlockAt(furnace.position.getX(), furnace.position.getY(), furnace.position.getZ()); + 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); + if (b != 0) {
+ a.world.getServer().getPluginManager().callEvent(event); + 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(); + i = event.getExpToDrop();
+ }
+ // CraftBukkit end + // CraftBukkit end
+ +
while (i > 0) { while (i > 0) {