public class LazyBlock extends BaseBlock
InputExtent.getLazyBlock(Vector)
that takes the block's ID and metadata, but will defer loading of NBT
data until time of access.
NBT data is later loaded using a call to InputExtent.getBlock(Vector)
with a stored Extent and location.
All mutators on this object will throw an
UnsupportedOperationException.
| Constructor and Description |
|---|
LazyBlock(int type,
Extent extent,
Vector position)
Create a new lazy block.
|
LazyBlock(int type,
int data,
Extent extent,
Vector position)
Create a new lazy block.
|
| Modifier and Type | Method and Description |
|---|---|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
void |
setData(int data)
Set the block's data value.
|
void |
setId(int id)
Set the block ID.
|
void |
setNbtData(CompoundTag nbtData)
Set the object's NBT data (tile entity data).
|
containsFuzzy, cycleData, equals, equalsFuzzy, flip, flip, getData, getId, getNbtId, getType, hashCode, hasNbtData, hasWildcardData, inIterable, internalSetData, internalSetId, isAir, rotate90, rotate90Reverse, setIdAndData, setType, toStringpublic LazyBlock(int type,
Extent extent,
Vector position)
type - the block typeextent - the extent to later load the full block data fromposition - the position to later load the full block data frompublic void setId(int id)
BaseBlocksetId in class BaseBlockid - block id (between 0 and BaseBlock.MAX_ID).public void setData(int data)
BaseBlocksetData in class BaseBlockdata - block data value (between 0 and BaseBlock.MAX_DATA).public CompoundTag getNbtData()
NbtValuedNbtValued.setNbtData(CompoundTag)
so that the instance knows of the changes. Making changes without
calling NbtValued.setNbtData(CompoundTag) could have unintended
consequences.
NbtValued.hasNbtData() must return true if and only if method does
not return null.
getNbtData in interface NbtValuedgetNbtData in class BaseBlockpublic void setNbtData(CompoundTag nbtData)
NbtValuedsetNbtData in interface NbtValuedsetNbtData in class BaseBlocknbtData - NBT data, or null if no dataCopyright © 2010-2014. All Rights Reserved.