From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Wed, 27 Sep 2023 22:11:15 +0900 Subject: [PATCH] Apply various optimizations [REFERENCE PATCHES] 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 93e558e1cfcdee33abf6f1c57e4cf47c7f53f750..0864624e060a32934208f80313cf08744509803d 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 public void playerTouch(Player player) {} public void push(Entity entity) { + if (entity.noPhysics || this.noPhysics) return; // Plazma if (!this.isPassengerOfSameVehicle(entity)) { - if (!entity.noPhysics && !this.noPhysics) { + //if (!entity.noPhysics && !this.noPhysics) { // Plazma - moved up if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper double d0 = entity.getX() - this.getX(); double d1 = entity.getZ() - this.getZ(); @@ -2175,7 +2176,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } } - } + //} // Plazma } }