9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-03 14:22:26 +00:00

Drop useless fix

getProfiler method is removed from PathNavigationRegion since 1.21.3 snapshot 24w37a
This commit is contained in:
Dreeam
2025-10-07 01:59:42 -04:00
parent 264c07bc24
commit bc3fce4949
176 changed files with 28 additions and 51 deletions

View File

@@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sat, 9 Aug 2025 14:55:37 +0900
Subject: [PATCH] optimize get chunk
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index e2223887acf161f7eea80708b0e0862baf07d0ee..7333225a3d50bd14da38019541cc9daa22bbf9ed 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -1410,12 +1410,17 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
}
}
// CraftBukkit end
- if (this.isOutsideBuildHeight(pos)) {
+ // Leaf start - optimize get chunk
+ int x = pos.getX();
+ int y = pos.getY();
+ int z = pos.getZ();
+ if (this.isOutsideBuildHeight(y)) {
return Blocks.VOID_AIR.defaultBlockState();
} else {
- ChunkAccess chunk = this.getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.FULL, true); // Paper - manually inline to reduce hops and avoid unnecessary null check to reduce total byte code size, this should never return null and if it does we will see it the next line but the real stack trace will matter in the chunk engine
- return chunk.getBlockState(pos);
+ ChunkAccess chunk = this.getChunk(x >> 4, z >> 4, ChunkStatus.FULL, true); // Paper - manually inline to reduce hops and avoid unnecessary null check to reduce total byte code size, this should never return null and if it does we will see it the next line but the real stack trace will matter in the chunk engine
+ return chunk.getBlockState(x, y, z);
}
+ // Leaf end - optimize get chunk
}
@Override