From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?= Date: Fri, 10 Apr 2020 15:47:15 +0800 Subject: [PATCH] Swaps the predicate order of collision Original license: GPLv3 Original project: https://github.com/Akarin-project/Akarin diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 5dc113137840ffe943f4f9c9f50a78b57d990af1..a02b8f64502326efa758bfa3bb861dc0a77dec65 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2009,8 +2009,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; // Akarin - Test this earlier if (!this.isPassengerOfSameVehicle(entity)) { - if (!entity.noPhysics && !this.noPhysics) { + if (true || !entity.noPhysics && !this.noPhysics) { // Akarin - 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();