mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
* Added Leaf Commands base * Added WIP /leaf reload * Added /leaf version * Change /gale permission to OP as default
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/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
|
index bb76dbf98979fdc725676c98dafe64ea941cb290..dd956431bb882daa70267685f2283d0c358336be 100644
|
|
--- a/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -649,7 +649,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
for (LevelChunk levelChunk : chunks) {
|
|
ChunkPos pos = levelChunk.getPos();
|
|
levelChunk.incrementInhabitedTime(timeInhabited);
|
|
- if (!filteredSpawningCategories.isEmpty() && this.level.getWorldBorder().isWithinBounds(pos) && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && this.chunkMap.anyPlayerCloseEnoughForSpawning(pos, true)) { // Spigot // Pufferfish
|
|
+ if (!filteredSpawningCategories.isEmpty() && this.level.getWorldBorder().isWithinBounds(pos) && lastSpawnState != null && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && this.chunkMap.anyPlayerCloseEnoughForSpawning(pos, true)) { // Spigot // Pufferfish // Leaf - Don't spawn if lastSpawnState is null
|
|
NaturalSpawner.spawnForChunk(this.level, levelChunk, lastSpawnState, filteredSpawningCategories); // Pufferfish
|
|
}
|
|
|