Files
PlazmaBukkitMC/patches/server/0018-Apply-various-optimizations.patch
AlphaKR93 0c58a0b04a Fix build
2024-12-26 01:22:49 +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 305a569f8cd83f3c67a4d4377f2881d36961dacd..8001ae563ac06d8ba9fd1de0b4111a3c8241de8c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2332,8 +2332,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();
@@ -2361,8 +2362,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.push(d0, 0.0D, d1);
}
}
-
- }
+ //} // Plazma - Swaps the predicate order of collision
}
}