public class LastAccessExtentCache extends AbstractDelegateExtent
BlockState
for repeated calls to
getBlock(Vector)
with the same position.Constructor and Description |
---|
LastAccessExtentCache(Extent extent)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
BlockState |
getBlock(Vector position)
Get a snapshot of the block at the given location.
|
commit, commitBefore, createEntity, getBiome, getEntities, getEntities, getExtent, getFullBlock, getMaximumPoint, getMinimumPoint, setBiome, setBlock
public LastAccessExtentCache(Extent extent)
extent
- the extentpublic BlockState getBlock(Vector position)
InputExtent
If the given position is out of the bounds of the extent, then the behavior
is undefined (an air block could be returned). However, null
should not be returned.
The returned block is immutable and is a snapshot of the block at the time
of call. It has no position attached to it, so it could be reused in
Pattern
s and so on.
getBlock
in interface InputExtent
getBlock
in class AbstractDelegateExtent
position
- position of the block