mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
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 9a13cf8460472b8d3968cd8269a2b63d0b49f1a9..5f82c902c9229e8bbba5dc74a89ff4a27e7649fc 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1216,7 +1216,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) {
|