Entity spawning asks the EntitySpawns services

WorldEntitySpawner and MarkerSpawnScanner no longer read spawners, entities or markers: modules plan the spawns and
describe the entities as EntitySpec, BukkitEntitySpawner creates them and the host checks light, surface and free space.
Block-break marker cleanup asks the module what a marker means.
This commit is contained in:
piexel committed 2026-10-09 22:16:35 +02:00
1 parent 8bf4fb0115
commit 406d3e47d3
12 files changed
+933 -184

No files matched your search

@@ -41,6 +41,7 @@ import art.arcane.iris.engine.object.world.biome.IrisBiome;
import art.arcane.iris.engine.object.terrain.IrisBiomePaletteLayer;
import art.arcane.iris.engine.object.world.dimension.IrisDimension;
import art.arcane.iris.engine.object.entity.IrisEntity;
import art.arcane.iris.engine.platform.BukkitEntitySpawner;
import art.arcane.iris.engine.object.terrain.IrisGenerator;
import art.arcane.iris.engine.object.noise.IrisInterpolator;
import art.arcane.iris.engine.object.loot.IrisLootTable;
@@ -661,7 +662,7 @@ public class CommandStudio implements DirectorExecutor {
// Entity creation must run on the thread owning the destination chunk.
Location at = new Location(world(), location.getX(), location.getY(), location.getZ());
if (!J.runAt(at, () -> entity.spawn(spawnEngine, at))) {
if (!J.runAt(at, () -> BukkitEntitySpawner.spawnByKey(spawnEngine, entity.getLoadKey(), at))) {
Iris.warn("Could not schedule the entity spawn at " + at.getBlockX() + ", " + at.getBlockY() + ", " + at.getBlockZ() + ".");
}
}