mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
20 lines
1.6 KiB
Diff
20 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Tue, 27 Aug 2024 22:53:08 -0400
|
|
Subject: [PATCH] Don't spawn if lastSpawnState is null
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index 09e06dbb8e3f9ce65fb0f9010aeb3066b6c21671..c649a21b2631ed8a2abe1b8d2ff1a5fbf5f511ec 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -633,7 +633,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
ChunkPos chunkcoordintpair = chunk.getPos();
|
|
|
|
chunk.incrementInhabitedTime(timeDelta);
|
|
- if (!list1.isEmpty() && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair, true)) { // Spigot // Pufferfish
|
|
+ if (!list1.isEmpty() && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && lastSpawnState != null && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair, true)) { // Spigot // Pufferfish // Leaf - Don't spawn if lastSpawnState is null
|
|
NaturalSpawner.spawnForChunk(this.level, chunk, lastSpawnState, list1); // Pufferfish
|
|
}
|
|
|