mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
feature: support paper chunk system (#1884)
* avoid usage of ticking chunk future on paper * fix entity handling * fix entity handling but on spigot * seems like no one uses spigot Co-authored-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
@ -141,10 +141,9 @@ public class BukkitWorld extends AbstractWorld {
|
||||
|
||||
@Override
|
||||
public List<com.sk89q.worldedit.entity.Entity> getEntities(Region region) {
|
||||
//FAWE start - allow async entity retrieval
|
||||
List<Entity> ents = WorldEditPlugin.getInstance().getBukkitImplAdapter().getEntities(getWorld());
|
||||
//FAWE end
|
||||
World world = getWorld();
|
||||
|
||||
List<Entity> ents = world.getEntities();
|
||||
List<com.sk89q.worldedit.entity.Entity> entities = new ArrayList<>();
|
||||
for (Entity ent : ents) {
|
||||
if (region.contains(BukkitAdapter.asBlockVector(ent.getLocation()))) {
|
||||
@ -157,9 +156,7 @@ public class BukkitWorld extends AbstractWorld {
|
||||
@Override
|
||||
public List<com.sk89q.worldedit.entity.Entity> getEntities() {
|
||||
List<com.sk89q.worldedit.entity.Entity> list = new ArrayList<>();
|
||||
//FAWE start - allow async entity retrieval
|
||||
for (Entity entity : WorldEditPlugin.getInstance().getBukkitImplAdapter().getEntities(getWorld())) {
|
||||
//FAWE end
|
||||
for (Entity entity : getWorld().getEntities()) {
|
||||
list.add(BukkitAdapter.adapt(entity));
|
||||
}
|
||||
return list;
|
||||
|
Reference in New Issue
Block a user