mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
* 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>
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Tue, 3 Jun 2025 18:51:44 +0900
|
|
Subject: [PATCH] cache getBiome
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
|
index 09e87552159e24603aa9a4f658ab4449d7eaeb0a..cfe6d74fa06e19c33e6342c76ca99e473840a65b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
|
@@ -302,6 +302,13 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
|
return this.handle.getBiome(pos);
|
|
}
|
|
|
|
+ // Leaf start - cache getBiome
|
|
+ @Override
|
|
+ public Holder<Biome> getBiomeCached(BlockPos pos) {
|
|
+ return this.handle.getBiomeCached(pos);
|
|
+ }
|
|
+ // Leaf end - cache getBiome
|
|
+
|
|
@Override
|
|
public Stream<BlockState> getBlockStatesIfLoaded(AABB box) {
|
|
return this.handle.getBlockStatesIfLoaded(box);
|