mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Paper Changes: PaperMC/Paper@c2bb144f Properly save level data async (#12530) PaperMC/Paper@e2ca4773 Remove simplify remote item matching option for now
20 lines
1.0 KiB
Diff
20 lines
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Sat, 10 May 2025 23:18:17 +0200
|
|
Subject: [PATCH] Optimise player movement checks
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index 2786fbc43f238be058b153ba551f0a616c4a18f4..376d8cb183145955b887597ef7ae25ce761a795a 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1176,7 +1176,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
// Paper end
|
|
|
|
- movement = this.maybeBackOffFromEdge(movement, type);
|
|
+ if (!org.dreeam.leaf.config.modules.opt.OptimizePlayerMovementProcessing.enabled) movement = this.maybeBackOffFromEdge(movement, type); // Leaf - Optimise player movement checks
|
|
Vec3 vec3 = this.collide(movement);
|
|
double d = vec3.lengthSqr();
|
|
if (d > 1.0E-7 || movement.lengthSqr() - d < 1.0E-7) {
|