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 aa171a1afb9800e6ec84f6b4f1b28e44177752f7..eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2309,8 +2309,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void playerTouch(Player player) {} public void push(Entity entity) { + if (entity.noPhysics || this.noPhysics) return; // Plazma - Swaps the predicate order of collision if (!this.isPassengerOfSameVehicle(entity)) { - if (!entity.noPhysics && !this.noPhysics) { + //if (!entity.noPhysics && !this.noPhysics) { // Plazma - Swaps the predicate order of collision 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(); @@ -2338,8 +2339,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.push(d0, 0.0D, d1); } } - - } + //} // Plazma - Swaps the predicate order of collision } }