This commit is contained in:
AlphaKR93
2024-01-25 16:10:43 +09:00
parent 04203941c1
commit e12e3db7ef
3 changed files with 38 additions and 46 deletions

View File

@@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations
Akarin - Swaps the predicate order of collision
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4bbede7891d103d68caa6265903479f2ce98683e..ef30864618d19a52a5cf91559b820f889e1da155 100644
index 453828b2239b82f99b3bd837b354c901add38644..a3db8a329fe30b63704c068223684492e9d30e9c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2145,8 +2145,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2144,8 +2144,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void playerTouch(Player player) {}
public void push(Entity entity) {
@@ -21,7 +21,7 @@ index 4bbede7891d103d68caa6265903479f2ce98683e..ef30864618d19a52a5cf91559b820f88
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
double d0 = entity.getX() - this.getX();
double d1 = entity.getZ() - this.getZ();
@@ -2174,8 +2175,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2173,8 +2174,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
entity.push(d0, 0.0D, d1);
}
}