mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-20 07:29:24 +00:00
* rebase * optimize LivingEntity#travel * cleanup * Replace fluid height map * reuse array list in Entity#collide * cleanup * fix fire and liquid collision shape * fix checkInside * inline betweenClosed * cleanup * optimize getOnPos * optimize equals in getOnPos * update mainSupportingBlockPos on dirty * cleanup * rename * merge same patch * rebase and remove properly * [ci skip] cleanup * rebase and rebuild * fix async locator * remove async locator * cleanup * rebase --------- Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Sat, 5 Jul 2025 17:01:43 +0900
|
|
Subject: [PATCH] optimize mob spawning
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
|
index 348bf5ed91ded3537a86bc0708e0158ad4f9296d..7a7d0b8c0b5e6d9b58ca973972bac488975e6e2a 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
|
@@ -290,6 +290,13 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|
return this.delegate.getMobsAt(biome, accessor, group, pos);
|
|
}
|
|
|
|
+ // Leaf start
|
|
+ @Override
|
|
+ public WeightedList<MobSpawnSettings.SpawnerData> getMobsAtChunk(Holder<net.minecraft.world.level.biome.Biome> biome, StructureManager accessor, MobCategory group, BlockPos pos, ChunkAccess chunk) {
|
|
+ return this.delegate.getMobsAtChunk(biome, accessor, group, pos, chunk);
|
|
+ }
|
|
+ // Leaf end
|
|
+
|
|
@Override
|
|
public void applyBiomeDecoration(WorldGenLevel level, ChunkAccess chunk, StructureManager structureManager) {
|
|
WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
|