From 3139af91dc039fc867ec780763e7bc337dff6ce0 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 24 Apr 2014 20:07:39 +0100 Subject: [PATCH] Fix broken hopper logic when moving more than one item in a stack --- .../0029-Hopper-Customisations.patch | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/CraftBukkit-Patches/0029-Hopper-Customisations.patch b/CraftBukkit-Patches/0029-Hopper-Customisations.patch index 72518bb363..7149370826 100644 --- a/CraftBukkit-Patches/0029-Hopper-Customisations.patch +++ b/CraftBukkit-Patches/0029-Hopper-Customisations.patch @@ -1,4 +1,4 @@ -From 4abf7241f8d31fc5a9aa42f461c996f435f7c171 Mon Sep 17 00:00:00 2001 +From 0467adc477c07485d63c96122b135c5b4ab5602b Mon Sep 17 00:00:00 2001 From: erocs Date: Sun, 8 Sep 2013 12:06:15 -0700 Subject: [PATCH] Hopper Customisations @@ -6,7 +6,7 @@ Subject: [PATCH] Hopper Customisations Allows editing hopper cooldowns and amount transferred per tick. diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 48a882a..e661462 100644 +index 48a882a..ba015aa 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -189,12 +189,18 @@ public class TileEntityHopper extends TileEntity implements IHopper { @@ -47,6 +47,15 @@ index 48a882a..e661462 100644 return false; } ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), i); +@@ -275,7 +281,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { + return true; + } + +- this.setItem(j, itemstack); ++ this.setItem(j, itemstack1); // Spigot + } + } + @@ -379,7 +385,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { if (itemstack != null && canTakeItemFromInventory(iinventory, itemstack, i, j)) { ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -68,6 +77,15 @@ index 48a882a..e661462 100644 } return false; +@@ -416,7 +422,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { + return true; + } + +- iinventory.setItem(i, itemstack1); ++ iinventory.setItem(i, itemstack2); // Spigot + } + + return false; @@ -502,7 +508,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { if (flag) {