From 421c1728c81e2f729dff88da2ac96535d2b8e5e8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 15 Jul 2018 10:00:00 +1000 Subject: Update to Minecraft 1.13-pre7 --- nms-patches/SlotFurnaceResult.patch | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'nms-patches/SlotFurnaceResult.patch') diff --git a/nms-patches/SlotFurnaceResult.patch b/nms-patches/SlotFurnaceResult.patch index bcc110d7..eee722f9 100644 --- a/nms-patches/SlotFurnaceResult.patch +++ b/nms-patches/SlotFurnaceResult.patch @@ -1,32 +1,32 @@ --- a/net/minecraft/server/SlotFurnaceResult.java +++ b/net/minecraft/server/SlotFurnaceResult.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +@@ -2,6 +2,10 @@ + import java.util.Iterator; + import java.util.Map.Entry; +// CraftBukkit start +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.FurnaceExtractEvent; +// CraftBukkit end -+ + public class SlotFurnaceResult extends Slot { - private final EntityHuman a; -@@ -51,6 +56,18 @@ - i = j; - } +@@ -66,6 +70,18 @@ + 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()); ++ // 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()); + -+ 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(); -+ } -+ // CraftBukkit end ++ 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(); ++ } ++ // CraftBukkit end + - while (i > 0) { - j = EntityExperienceOrb.getOrbValue(i); - i -= j; + while (i > 0) { + j = EntityExperienceOrb.getOrbValue(i); + i -= j; -- cgit v1.2.3