mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix world events
This commit is contained in:
parent
970a5ec763
commit
a4ba07de99
@ -78,7 +78,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEntitySpawn(EntitySpawnEvent e) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,11 +69,13 @@ public class HeadlessWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public World load() {
|
public World load() {
|
||||||
return new WorldCreator(worldName)
|
World w = new WorldCreator(worldName)
|
||||||
.environment(dimension.getEnvironment())
|
.environment(dimension.getEnvironment())
|
||||||
.seed(world.seed())
|
.seed(world.seed())
|
||||||
.generator(new EngineCompositeGenerator(dimension.getLoadKey(), !studio))
|
.generator(new EngineCompositeGenerator(dimension.getLoadKey(), !studio))
|
||||||
.createWorld();
|
.createWorld();
|
||||||
|
world.realWorld(w);
|
||||||
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HeadlessWorld from(World world) {
|
public static HeadlessWorld from(World world) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user