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 a13e6d41584a55e3e17d55d568b23f48082750ef..23eb620351ee08cac97e0408f1fc6cee33f036d0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2139,8 +2139,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { 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(); @@ -2169,7 +2170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } } - } + //} // Plazma } }