Fix world events

This commit is contained in:
Daniel Mills 2021-07-24 09:42:06 -04:00
parent 970a5ec763
commit a4ba07de99
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
@Override
public void onEntitySpawn(EntitySpawnEvent e) {
if (getTarget().getWorld() == null || !getTarget().getWorld().equals(e.getEntity().getWorld())) {
if (getTarget().getWorld() == null || !e.getEntity().getWorld().equals(getTarget().getWorld().realWorld())) {
return;
}

View File

@ -69,11 +69,13 @@ public class HeadlessWorld {
}
public World load() {
return new WorldCreator(worldName)
World w = new WorldCreator(worldName)
.environment(dimension.getEnvironment())
.seed(world.seed())
.generator(new EngineCompositeGenerator(dimension.getLoadKey(), !studio))
.createWorld();
world.realWorld(w);
return w;
}
public static HeadlessWorld from(World world) {