public class ChangeSetExtent extends AbstractDelegateExtent
ChangeSet
.Constructor and Description |
---|
ChangeSetExtent(Extent extent,
ChangeSet changeSet)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
Entity |
createEntity(Location location,
BaseEntity state)
Create an entity at the given location.
|
java.util.List<? extends Entity> |
getEntities()
Get a list of all entities.
|
java.util.List<? extends Entity> |
getEntities(Region region)
Get a list of all entities within the given region.
|
boolean |
setBlock(Vector location,
BaseBlock block)
Change the block at the given location to the given block.
|
commit, commitBefore, getBiome, getBlock, getExtent, getLazyBlock, getMaximumPoint, getMinimumPoint, setBiome
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException
OutputExtent
BaseBlock
to the world, so future changes to the
BaseBlock
do not affect the world until this method is called again.
The return value of this method indicates whether the change was probably successful. It may not be successful if, for example, the location is out of the bounds of the extent. It may be unsuccessful if the block passed is the same as the one in the world. However, the return value is only an estimation and it may be incorrect, but it could be used to count, for example, the approximate number of changes.
setBlock
in interface OutputExtent
setBlock
in class AbstractDelegateExtent
location
- position of the blockblock
- block to setWorldEditException
- thrown on an error@Nullable public Entity createEntity(Location location, BaseEntity state)
Extent
createEntity
in interface Extent
createEntity
in class AbstractDelegateExtent
location
- the locationstate
- the entitypublic java.util.List<? extends Entity> getEntities()
Extent
If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.
getEntities
in interface Extent
getEntities
in class AbstractDelegateExtent
public java.util.List<? extends Entity> getEntities(Region region)
Extent
If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.
getEntities
in interface Extent
getEntities
in class AbstractDelegateExtent
region
- the region in which entities must be contained