Files
PlazmaBukkitMC/patches/server/0018-Apply-various-optimizations.patch
2024-01-25 16:00:44 +09:00

34 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
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 4bbede7891d103d68caa6265903479f2ce98683e..ef30864618d19a52a5cf91559b820f889e1da155 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 - 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();
@@ -2174,8 +2175,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
entity.push(d0, 0.0D, d1);
}
}
-
- }
+ //} // Plazma - Swaps the predicate order of collision
}
}