diff --git a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch index ef02d4d07a..3c88ebb1d4 100644 --- a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch @@ -63,7 +63,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 + * Make sure the inventory selector stays in sync. + * It should be the one that checks `var1 instanceof IInventory && var1.isAlive()` + */ -+ if (predicate == IEntitySelector.c && inventoryEntityCounts[k] <= 0) continue; ++ if (predicate == IEntitySelector.isInventory() && inventoryEntityCounts[k] <= 0) continue; + // Paper end while (iterator.hasNext()) { Entity entity1 = (Entity) iterator.next(); @@ -87,4 +87,16 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 Iterator iterator = this.entitySlices[k].iterator(); // Spigot while (iterator.hasNext()) { +diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java +index 7ac07ac07ac0..7ac07ac07ac0 100644 +--- a/src/main/java/net/minecraft/server/IEntitySelector.java ++++ b/src/main/java/net/minecraft/server/IEntitySelector.java +@@ -0,0 +0,0 @@ public final class IEntitySelector { + public static final Predicate<Entity> c = (entity) -> { + return entity.isAlive() && !entity.isVehicle() && !entity.isPassenger(); + }; ++ public static final Predicate<Entity> isInventory() { return d; } // Paper - OBFHELPER + public static final Predicate<Entity> d = (entity) -> { + return entity instanceof IInventory && entity.isAlive(); + }; -- \ No newline at end of file