mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +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:
@@ -22,11 +22,16 @@ package com.sk89q.worldedit.extent;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
import com.sk89q.worldedit.function.operation.OperationQueue;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
@@ -70,6 +75,17 @@ public abstract class AbstractDelegateExtent implements Extent {
|
||||
return extent.setBlock(location, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
return extent.createEntity(location, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities() {
|
||||
return extent.getEntities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vector getMinimumPoint() {
|
||||
return extent.getMinimumPoint();
|
||||
|
Reference in New Issue
Block a user