aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1020-Optimize-Hoppers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/1020-Optimize-Hoppers.patch')
-rw-r--r--patches/server/1020-Optimize-Hoppers.patch17
1 files changed, 6 insertions, 11 deletions
diff --git a/patches/server/1020-Optimize-Hoppers.patch b/patches/server/1020-Optimize-Hoppers.patch
index 33aed0ce2b..a73804d96d 100644
--- a/patches/server/1020-Optimize-Hoppers.patch
+++ b/patches/server/1020-Optimize-Hoppers.patch
@@ -105,7 +105,7 @@ index a7dfad2696e7145af1355a5db132af14d09a6f30..b0421823684ff6b9474b81675742d2ee
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
-index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba9e873c22 100644
+index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..da30c7fd750aa7b912310368100a5261c189715f 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -156,6 +156,43 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -470,12 +470,7 @@ index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba
return true;
}
-@@ -342,48 +578,52 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
- }
- }
-
-+ @io.papermc.paper.annotation.DoNotUse // Paper - Optimize hoppers
- private static boolean tryTakeInItemFromSlot(Hopper ihopper, Container iinventory, int i, Direction enumdirection, Level world) { // Spigot
+@@ -346,44 +582,47 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
ItemStack itemstack = iinventory.getItem(i);
if (!itemstack.isEmpty() && HopperBlockEntity.canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) {
@@ -561,7 +556,7 @@ index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba
}
return false;
-@@ -392,12 +632,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -392,12 +631,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
public static boolean addItem(Container inventory, ItemEntity itemEntity) {
boolean flag = false;
// CraftBukkit start
@@ -577,7 +572,7 @@ index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba
ItemStack itemstack = itemEntity.getItem().copy();
ItemStack itemstack1 = HopperBlockEntity.addItem((Container) null, inventory, itemstack, (Direction) null);
-@@ -491,7 +733,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -491,7 +732,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
stack = stack.split(to.getMaxStackSize());
}
// Spigot end
@@ -587,7 +582,7 @@ index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba
stack = leftover; // Paper - Make hoppers respect inventory max stack size
flag = true;
} else if (HopperBlockEntity.canMergeItems(itemstack1, stack)) {
-@@ -571,14 +815,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -571,14 +814,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@Nullable
public static Container getContainerAt(Level world, BlockPos pos) {
@@ -610,7 +605,7 @@ index 92086ca118d55ec49cefa5bf18977f8706e3e4b4..f78343b50641a63110b8867ad84298ba
iinventory = HopperBlockEntity.getEntityContainer(world, x, y, z);
}
-@@ -613,13 +863,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -613,13 +862,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@Nullable
private static Container getEntityContainer(Level world, double x, double y, double z) {