mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
backport 1.21.8 async mob spawn (#479)
* backport: 1.21.8 async mob spawn * Move into patch * fix * fix build --------- Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Co-authored-by: hayanesuru <hayanesuru@outlook.jp>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Taiyou06 <kaandindar21@gmail.com>
|
||||
Date: Sun, 11 May 2025 00:37:44 +0200
|
||||
Subject: [PATCH] Optimise player movement checks
|
||||
|
||||
|
||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/common/misc/SingleUserAreaMap.java b/src/main/java/ca/spottedleaf/moonrise/common/misc/SingleUserAreaMap.java
|
||||
index 94689e0342cf95dbedec955d67c95fa07a219678..8a888d52495bd6f447b8d767ca80de20dfee66b9 100644
|
||||
--- a/src/main/java/ca/spottedleaf/moonrise/common/misc/SingleUserAreaMap.java
|
||||
+++ b/src/main/java/ca/spottedleaf/moonrise/common/misc/SingleUserAreaMap.java
|
||||
@@ -88,6 +88,11 @@ public abstract class SingleUserAreaMap<T> {
|
||||
if (fromX == NOT_SET) {
|
||||
return false;
|
||||
}
|
||||
+ // Leaf start - Optimise player movement checks
|
||||
+ if (org.dreeam.leaf.config.modules.opt.OptimizePlayerMovementProcessing.enabled && fromX == toX && fromZ == toZ && oldViewDistance == newViewDistance) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Leaf end - Optimise player movement checks
|
||||
|
||||
this.lastChunkX = toX;
|
||||
this.lastChunkZ = toZ;
|
||||
Reference in New Issue
Block a user