25 lines
1.4 KiB
Diff
25 lines
1.4 KiB
Diff
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?=
|
|
<tsao-chi@the-lingo.org>
|
|
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 ae428552912f5a484ecf581b24c0e362c3e2407f..a21f7de5331fc31a291fe177e6e1e843c7895cee 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1983,8 +1983,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();
|