|
|
|
|
@@ -14,7 +14,7 @@ Generally faster than the non-async approach
|
|
|
|
|
iterate over all entities, get their chunk, and increment the count
|
|
|
|
|
|
|
|
|
|
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
index 79674f4bd7a12c42dec19a4175012d7a2dc88b84..0a97a491737807d59815b75635fa3d8c94901ba8 100644
|
|
|
|
|
index a640cb4d767c6c81ad27bbf0dd8027a80a2fc224..f4d4f39540a25d6772c8078d0ff01af04d90c8e7 100644
|
|
|
|
|
--- a/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
+++ b/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
@@ -287,6 +287,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
|
|
|
@@ -26,7 +26,7 @@ index 79674f4bd7a12c42dec19a4175012d7a2dc88b84..0a97a491737807d59815b75635fa3d8c
|
|
|
|
|
}
|
|
|
|
|
// Paper end - Optional per player mob spawns
|
|
|
|
|
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
|
|
|
|
index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92c49df9b1 100644
|
|
|
|
|
index 46e171ca454253c32e22c0c18587e9a7ba19f331..43156ecde8bb86c77f3b13c17b3330eae95efcc3 100644
|
|
|
|
|
--- a/net/minecraft/server/level/ServerChunkCache.java
|
|
|
|
|
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
|
|
|
|
@@ -70,11 +70,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
@@ -78,7 +78,7 @@ index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92
|
|
|
|
|
// Paper start - per player mob spawning backoff
|
|
|
|
|
for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) {
|
|
|
|
|
player.mobCounts[ii] = 0;
|
|
|
|
|
@@ -524,14 +541,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
@@ -524,34 +541,27 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
player.mobBackoffCounts[ii] = newBackoff;
|
|
|
|
|
}
|
|
|
|
|
// Paper end - per player mob spawning backoff
|
|
|
|
|
@@ -89,26 +89,46 @@ index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92
|
|
|
|
|
_pufferfish_spawnCountsReady.set(true);
|
|
|
|
|
}
|
|
|
|
|
if (_pufferfish_spawnCountsReady.getAndSet(false)) {
|
|
|
|
|
+ int mapped = distanceManager.getNaturalSpawnChunkCount();
|
|
|
|
|
+ final int mapped = distanceManager.getNaturalSpawnChunkCount();
|
|
|
|
|
+ final Iterable<Entity> entities = this.level.getAllEntities();
|
|
|
|
|
net.minecraft.server.MinecraftServer.getServer().mobSpawnExecutor.submit(() -> {
|
|
|
|
|
- int mapped = distanceManager.getNaturalSpawnChunkCount();
|
|
|
|
|
ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.Iterator<Entity> objectiterator =
|
|
|
|
|
level.entityTickList.entities.iterator(ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.ITERATOR_FLAG_SEE_ADDITIONS);
|
|
|
|
|
try {
|
|
|
|
|
@@ -542,10 +559,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
new LocalMobCapCalculator(chunkMap) : null;
|
|
|
|
|
|
|
|
|
|
// This ensures the caps are properly enforced by using the correct calculator
|
|
|
|
|
- ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.Iterator<Entity> objectiterator =
|
|
|
|
|
- level.entityTickList.entities.iterator(ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.ITERATOR_FLAG_SEE_ADDITIONS);
|
|
|
|
|
- try {
|
|
|
|
|
- gg.pufferfish.pufferfish.util.IterableWrapper<Entity> wrappedIterator =
|
|
|
|
|
- new gg.pufferfish.pufferfish.util.IterableWrapper<>(objectiterator);
|
|
|
|
|
- // Fix: Use proper mob cap calculator based on configuration
|
|
|
|
|
- LocalMobCapCalculator mobCapCalculator = !level.paperConfig().entities.spawning.perPlayerMobSpawns ?
|
|
|
|
|
- new LocalMobCapCalculator(chunkMap) : null;
|
|
|
|
|
-
|
|
|
|
|
- // This ensures the caps are properly enforced by using the correct calculator
|
|
|
|
|
- lastSpawnState = NaturalSpawner.createState(
|
|
|
|
|
+ lastSpawnState = NaturalSpawner.createState1( // Leaf - optimize mob spawning
|
|
|
|
|
mapped,
|
|
|
|
|
wrappedIterator,
|
|
|
|
|
- mapped,
|
|
|
|
|
- wrappedIterator,
|
|
|
|
|
- ServerChunkCache.this::getFullChunk,
|
|
|
|
|
+ this.level, // Leaf - optimize mob spawning
|
|
|
|
|
mobCapCalculator, // This is the key fix - was previously null
|
|
|
|
|
level.paperConfig().entities.spawning.perPlayerMobSpawns
|
|
|
|
|
);
|
|
|
|
|
@@ -610,6 +627,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
- mobCapCalculator, // This is the key fix - was previously null
|
|
|
|
|
- level.paperConfig().entities.spawning.perPlayerMobSpawns
|
|
|
|
|
- );
|
|
|
|
|
- } finally {
|
|
|
|
|
- objectiterator.finishedIterating();
|
|
|
|
|
- }
|
|
|
|
|
+ // Fix: Use proper mob cap calculator based on configuration
|
|
|
|
|
+ LocalMobCapCalculator mobCapCalculator = !level.paperConfig().entities.spawning.perPlayerMobSpawns ?
|
|
|
|
|
+ new LocalMobCapCalculator(chunkMap) : null;
|
|
|
|
|
+
|
|
|
|
|
+ // This ensures the caps are properly enforced by using the correct calculator
|
|
|
|
|
+ lastSpawnState = NaturalSpawner.createState1( // Leaf - optimize mob spawning
|
|
|
|
|
+ mapped,
|
|
|
|
|
+ entities,
|
|
|
|
|
+ this.level, // Leaf - optimize mob spawning
|
|
|
|
|
+ mobCapCalculator, // This is the key fix - was previously null
|
|
|
|
|
+ level.paperConfig().entities.spawning.perPlayerMobSpawns
|
|
|
|
|
+ );
|
|
|
|
|
_pufferfish_spawnCountsReady.set(true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@@ -610,6 +620,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
chunkRange = Math.min(chunkRange, 8);
|
|
|
|
|
entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange);
|
|
|
|
|
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
|
|
|
|
@@ -116,7 +136,7 @@ index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92
|
|
|
|
|
}
|
|
|
|
|
// Paper end - PlayerNaturallySpawnCreaturesEvent
|
|
|
|
|
boolean flag = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
|
|
|
|
@@ -621,16 +639,40 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
@@ -621,16 +632,40 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
List<LevelChunk> list = this.spawningChunks;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
@@ -162,7 +182,7 @@ index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92
|
|
|
|
|
list.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -648,7 +690,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
@@ -648,7 +683,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!spawnCategories.isEmpty()) {
|
|
|
|
|
@@ -184,7 +204,7 @@ index 02c2b9c1978959e1ee0be5c72a5f7b98aa282fc2..4ec5142e233c87d2bb1ebe883cf10a5a
|
|
|
|
|
final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting
|
|
|
|
|
ChunkPos pos = chunk.getPos();
|
|
|
|
|
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
|
|
|
|
index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a47c8bc6c8 100644
|
|
|
|
|
index 81e176d17fb072f9ee531639abfe42134ae833a9..c3284577437412e1c3fb891bee2b0e20b52ccd59 100644
|
|
|
|
|
--- a/net/minecraft/world/level/NaturalSpawner.java
|
|
|
|
|
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
|
|
|
|
@@ -68,6 +68,7 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -195,7 +215,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
public static NaturalSpawner.SpawnState createState(
|
|
|
|
|
int spawnableChunkCount, Iterable<Entity> entities, NaturalSpawner.ChunkGetter chunkGetter, LocalMobCapCalculator calculator, final boolean countMobs
|
|
|
|
|
) {
|
|
|
|
|
@@ -108,9 +109,69 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -108,9 +109,71 @@ public final class NaturalSpawner {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -225,20 +245,21 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
+ // Paper end - Only count natural spawns
|
|
|
|
|
+ BlockPos blockPos = entity.blockPosition();
|
|
|
|
|
+ LevelChunk chunk = level.chunkSource.fullChunks.get(ChunkPos.asLong(blockPos));
|
|
|
|
|
+ MobSpawnSettings.MobSpawnCost mobSpawnCost = getRoughBiome(blockPos, chunk).getMobSettings().getMobSpawnCost(entity.getType());
|
|
|
|
|
+ if (mobSpawnCost != null) {
|
|
|
|
|
+ potentialCalculator.addCharge(entity.blockPosition(), mobSpawnCost.charge());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (chunk != null) {
|
|
|
|
|
+ MobSpawnSettings.MobSpawnCost mobSpawnCost = getRoughBiome(blockPos, chunk).getMobSettings().getMobSpawnCost(entity.getType());
|
|
|
|
|
+ if (mobSpawnCost != null) {
|
|
|
|
|
+ potentialCalculator.addCharge(entity.blockPosition(), mobSpawnCost.charge());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (calculator != null && entity instanceof Mob) { // Paper - Optional per player mob spawns
|
|
|
|
|
+ calculator.addMob(chunk.getPos(), category);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (calculator != null && entity instanceof Mob) { // Paper - Optional per player mob spawns
|
|
|
|
|
+ calculator.addMob(chunk.getPos(), category);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ map.addTo(category, 1);
|
|
|
|
|
+ // Paper start - Optional per player mob spawns
|
|
|
|
|
+ if (countMobs) {
|
|
|
|
|
+ final int index = entity.getType().getCategory().ordinal();
|
|
|
|
|
+ ++chunkCap.computeIfAbsent(chunk.getPos().longKey, k -> new int[net.minecraft.server.level.ServerPlayer.MOBCATEGORY_TOTAL_ENUMS])[index];
|
|
|
|
|
+ map.addTo(category, 1);
|
|
|
|
|
+ // Paper start - Optional per player mob spawns
|
|
|
|
|
+ if (countMobs) {
|
|
|
|
|
+ final int index = entity.getType().getCategory().ordinal();
|
|
|
|
|
+ ++chunkCap.computeIfAbsent(chunk.getPos().longKey, k -> new int[net.minecraft.server.level.ServerPlayer.MOBCATEGORY_TOTAL_ENUMS])[index];
|
|
|
|
|
+ /*
|
|
|
|
|
+ final int index = entity.getType().getCategory().ordinal();
|
|
|
|
|
+ final var inRange = level.moonrise$getNearbyPlayers().getPlayers(entity.chunkPosition(), NearbyPlayers.NearbyMapType.TICK_VIEW_DISTANCE);
|
|
|
|
|
@@ -253,8 +274,9 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
+ ++playerCap.computeIfAbsent(player, k -> new int[net.minecraft.server.level.ServerPlayer.MOBCATEGORY_TOTAL_ENUMS])[index];
|
|
|
|
|
+ }
|
|
|
|
|
+ */
|
|
|
|
|
+ }
|
|
|
|
|
+ // Paper end - Optional per player mob spawns
|
|
|
|
|
+ }
|
|
|
|
|
+ // Paper end - Optional per player mob spawns
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
@@ -266,7 +288,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
static Biome getRoughBiome(BlockPos pos, ChunkAccess chunk) {
|
|
|
|
|
return chunk.getNoiseBiome(QuartPos.fromBlock(pos.getX()), QuartPos.fromBlock(pos.getY()), QuartPos.fromBlock(pos.getZ())).value();
|
|
|
|
|
}
|
|
|
|
|
@@ -265,28 +326,68 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -265,28 +328,68 @@ public final class NaturalSpawner {
|
|
|
|
|
MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer<Entity> trackEntity, final boolean nothing
|
|
|
|
|
// Paper end - throttle failed spawn attempts
|
|
|
|
|
) {
|
|
|
|
|
@@ -342,7 +364,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
mutableBlockPos.set(x, y, z);
|
|
|
|
|
double d = x + 0.5;
|
|
|
|
|
double d1 = z + 0.5;
|
|
|
|
|
@@ -295,8 +396,8 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -295,8 +398,8 @@ public final class NaturalSpawner {
|
|
|
|
|
double d2 = nearestPlayer.distanceToSqr(d, y, d1);
|
|
|
|
|
if (level.isLoadedAndInBounds(mutableBlockPos) && isRightDistanceToPlayerAndSpawnPoint(level, chunk, mutableBlockPos, d2)) { // Paper - don't load chunks for mob spawn
|
|
|
|
|
if (spawnerData == null) {
|
|
|
|
|
@@ -353,7 +375,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
);
|
|
|
|
|
if (randomSpawnMobAt.isEmpty()) {
|
|
|
|
|
break;
|
|
|
|
|
@@ -307,7 +408,7 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -307,7 +410,7 @@ public final class NaturalSpawner {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Paper start - PreCreatureSpawnEvent
|
|
|
|
|
@@ -362,7 +384,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
// Paper start - per player mob count backoff
|
|
|
|
|
if (doSpawning == PreSpawnStatus.ABORT || doSpawning == PreSpawnStatus.CANCELLED) {
|
|
|
|
|
level.getChunkSource().chunkMap.updateFailurePlayerMobTypeMap(mutableBlockPos.getX() >> 4, mutableBlockPos.getZ() >> 4, category);
|
|
|
|
|
@@ -414,6 +515,44 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -414,6 +517,44 @@ public final class NaturalSpawner {
|
|
|
|
|
&& level.noCollision(entityType.getSpawnAABB(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5));
|
|
|
|
|
return success ? PreSpawnStatus.SUCCESS : PreSpawnStatus.FAIL; // Paper - PreCreatureSpawnEvent
|
|
|
|
|
}
|
|
|
|
|
@@ -407,7 +429,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
|
private static Mob getMobForSpawn(ServerLevel level, EntityType<?> entityType) {
|
|
|
|
|
@@ -449,6 +588,17 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -449,6 +590,17 @@ public final class NaturalSpawner {
|
|
|
|
|
: mobsAt(level, structureManager, generator, category, pos, biome).getRandom(random);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -425,7 +447,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
private static boolean canSpawnMobAt(
|
|
|
|
|
ServerLevel level, StructureManager structureManager, ChunkGenerator generator, MobCategory category, MobSpawnSettings.SpawnerData data, BlockPos pos
|
|
|
|
|
) {
|
|
|
|
|
@@ -463,6 +613,16 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -463,6 +615,16 @@ public final class NaturalSpawner {
|
|
|
|
|
: generator.getMobsAt(biome != null ? biome : (org.dreeam.leaf.config.modules.opt.OptimizeBiome.mobSpawn ? level.getBiomeCached(null, pos) : level.getBiome(pos)), structureManager, cetagory, pos); // Leaf - cache getBiome
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -442,7 +464,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
public static boolean isInNetherFortressBounds(BlockPos pos, ServerLevel level, MobCategory category, StructureManager structureManager) {
|
|
|
|
|
if (category == MobCategory.MONSTER && level.getBlockState(pos.below()).is(Blocks.NETHER_BRICKS)) {
|
|
|
|
|
Structure structure = structureManager.registryAccess().lookupOrThrow(Registries.STRUCTURE).getValue(BuiltinStructures.FORTRESS);
|
|
|
|
|
@@ -472,6 +632,17 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -472,6 +634,17 @@ public final class NaturalSpawner {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -460,7 +482,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
private static BlockPos getRandomPosWithin(Level level, LevelChunk chunk) {
|
|
|
|
|
ChunkPos pos = chunk.getPos();
|
|
|
|
|
int i = pos.getMinBlockX() + level.random.nextInt(16);
|
|
|
|
|
@@ -612,18 +783,21 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -612,18 +785,21 @@ public final class NaturalSpawner {
|
|
|
|
|
@Nullable
|
|
|
|
|
private EntityType<?> lastCheckedType;
|
|
|
|
|
private double lastCharge;
|
|
|
|
|
@@ -483,7 +505,7 @@ index 81e176d17fb072f9ee531639abfe42134ae833a9..1052353f3a1ed52ac51cb0bb12f9e6a4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean canSpawn(EntityType<?> entityType, BlockPos pos, ChunkAccess chunk) {
|
|
|
|
|
@@ -680,5 +854,32 @@ public final class NaturalSpawner {
|
|
|
|
|
@@ -680,5 +856,32 @@ public final class NaturalSpawner {
|
|
|
|
|
boolean canSpawnForCategoryLocal(MobCategory category, ChunkPos chunkPos) {
|
|
|
|
|
return this.localMobCapCalculator.canSpawn(category, chunkPos);
|
|
|
|
|
}
|
|
|
|
|
@@ -594,3 +616,16 @@ index 11c7c299d4affb9e78488590e7db939efe6e3dd9..a89c61aac1f1a35dc8c5943c0002661c
|
|
|
|
|
public void createStructures(
|
|
|
|
|
RegistryAccess registryAccess,
|
|
|
|
|
ChunkGeneratorStructureState structureState,
|
|
|
|
|
diff --git a/net/minecraft/world/level/entity/EntityTickList.java b/net/minecraft/world/level/entity/EntityTickList.java
|
|
|
|
|
index 5a90b3bffeeb08a168b370e49d18c5f8b257a980..ba173bc1751c495e6fa497566b5ed3c7a9547364 100644
|
|
|
|
|
--- a/net/minecraft/world/level/entity/EntityTickList.java
|
|
|
|
|
+++ b/net/minecraft/world/level/entity/EntityTickList.java
|
|
|
|
|
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
|
|
|
|
|
import net.minecraft.world.entity.Entity;
|
|
|
|
|
|
|
|
|
|
public class EntityTickList {
|
|
|
|
|
- public final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<net.minecraft.world.entity.Entity> entities = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>(org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled); // Paper - rewrite chunk system // Pufferfish - private->public and do thread check
|
|
|
|
|
+ private final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<net.minecraft.world.entity.Entity> entities = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>(); // Paper - rewrite chunk system
|
|
|
|
|
|
|
|
|
|
// Leaf start - SparklyPaper - parallel world ticking mod
|
|
|
|
|
// preserve original constructor
|
|
|
|
|
|