Files
PlazmaBukkitMC/patches/server/0019-Apply-various-optimizations.patch
Alpha 0309438d9f Add Upstream updaters in buildscript (#78)
* Use libs.versions.toml

* Use libs.versions.toml

* Add update upstream tasks

* Some cleanup
2024-01-18 18:22:48 +09:00

33 lines
1.5 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 a13e6d41584a55e3e17d55d568b23f48082750ef..23eb620351ee08cac97e0408f1fc6cee33f036d0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2139,8 +2139,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; // Plazma
if (!this.isPassengerOfSameVehicle(entity)) {
- if (!entity.noPhysics && !this.noPhysics) {
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma - 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();
@@ -2169,7 +2170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
- }
+ //} // Plazma
}
}