geforkt von Mirrors/Paper
fix "avoid hopper searches" and make it use an obfhelper
Dieser Commit ist enthalten in:
Ursprung
66c2497101
Commit
e4a5ddd929
@ -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();
|
||||
};
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren