Get entities sync

This commit is contained in:
Jesse Boyd 2016-05-20 23:49:09 +10:00
parent 9f86b8fe33
commit ba2f9159b6

View File

@ -363,13 +363,23 @@ public class WorldWrapper extends AbstractWorld {
}
@Override
public List<? extends Entity> getEntities(Region region) {
return parent.getEntities(region);
public List<? extends Entity> getEntities(final Region region) {
return TaskManager.IMP.sync(new RunnableVal<List<? extends Entity>>() {
@Override
public void run(List<? extends Entity> value) {
this.value = parent.getEntities(region);
}
});
}
@Override
public List<? extends Entity> getEntities() {
return parent.getEntities();
return TaskManager.IMP.sync(new RunnableVal<List<? extends Entity>>() {
@Override
public void run(List<? extends Entity> value) {
this.value = parent.getEntities();
}
});
}
@Override