mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Added incomplete entity support to all Extents.
The Bukkit implementation supports the new entity API, but it has not yet been tested. The Forge implementation does not support the entity API yet. At the moment, an UnsupportedOperationException is thrown for Entity.getState() in some implementations, but use of an exception should probably not be allowed. BaseEntity is now an interface. It should not be possible to create instances of BaseEntity because it may be implementation-specific.
This commit is contained in:
@ -26,11 +26,14 @@ import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
|
||||
import com.sk89q.worldedit.world.mapping.NullResolver;
|
||||
import com.sk89q.worldedit.world.mapping.Resolver;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A null implementation of {@link World} that drops all changes and
|
||||
@ -128,4 +131,15 @@ public class NullWorld extends AbstractWorld {
|
||||
public <T> T getMetaData(BaseEntity entity, Class<T> metaDataClass) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user