mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-31 04:46:38 +00:00
21 lines
1.8 KiB
Diff
21 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Tue, 24 Oct 2023 17:50:49 -0400
|
|
Subject: [PATCH] sync with Gale's
|
|
Skip-unnecessary-mob-spawning-computations.patch
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index 25bbb4afdb616d827db4a511ebc503445bec27fa..448f3a5197901c9d861bfca92ab3105056726624 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -629,7 +629,7 @@ public class ServerChunkCache extends ChunkSource {
|
|
// Paper end - optimise chunk tick iteration
|
|
if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) { // Paper - optimise chunk tick iteration
|
|
chunk1.incrementInhabitedTime(j);
|
|
- if (spawn && flag2 && (!org.dreeam.leaf.LeafConfig.enableAsyncMobSpawning || _pufferfish_spawnCountsReady.get()) && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Pufferfish
|
|
+ if (spawn && flag2AndHasNaturalSpawn && (!org.dreeam.leaf.LeafConfig.enableAsyncMobSpawning || _pufferfish_spawnCountsReady.get()) && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Gale - MultiPaper - skip unnecessary mob spawning computations // Pufferfish
|
|
NaturalSpawner.spawnForChunk(this.level, chunk1, lastSpawnState, this.spawnFriendlies, this.spawnEnemies, flag1); // Pufferfish
|
|
}
|
|
|