public class TridentBlock extends AbstractBlockMetaOwner<Block> implements Block
| Modifier and Type | Field and Description |
|---|---|
protected byte |
data
The block metadata
|
protected Substance |
material
The type for this block
|
| Constructor and Description |
|---|
TridentBlock(Position location)
Constructs the wrapper representing the block
|
TridentBlock(Position location,
Substance substance,
byte meta) |
| Modifier and Type | Method and Description |
|---|---|
<M extends BlockMeta<Block>> |
applyMeta(boolean replace,
M... meta)
Commits the changes from the meta value to the block
|
void |
clearMeta()
Removes all meta values and sets the block meta to
(byte) 0 |
protected MetaCollection<Block> |
collect()
Create the metadata storage collection
|
byte |
meta()
Gets the tile data
|
Position |
position()
Returns the Location of the Block
|
Block |
relativeBlock(Vector vector)
Returns a block immediately to the direction specified
|
void |
setMeta(byte data)
Sets the tile data
|
void |
setSubstance(Substance substance)
Sets the substance the tile is made of
|
void |
setSubstanceAndMeta(Substance substance,
byte data)
Sets the substance the tile is made of and its tile data
|
Substance |
substance()
Gets the substance the tile is made of
|
applyMeta, newMetaIfNull, obtainMeta, ownedMetaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyMeta, newMetaIfNull, obtainMeta, ownedMetaprotected byte data
@InternalUseOnly public TridentBlock(Position location)
location - Location of the Blockpublic TridentBlock(Position location, Substance substance, byte meta)
public Substance substance()
Blockpublic void setSubstance(Substance substance)
BlocksetSubstance in interface Blocksubstance - the substance the tile should be set topublic Position position()
Blockpublic Block relativeBlock(Vector vector)
BlockrelativeBlock in interface Blockvector - the direction to look for the block adjacent to the currentpublic void setSubstanceAndMeta(Substance substance, byte data)
BlocksetSubstanceAndMeta in interface Blocksubstance - the substance the tile should be set todata - the data the tile should be set toprotected MetaCollection<Block> collect()
AbstractBlockMetaOwnercollect in class AbstractBlockMetaOwner<Block>public void clearMeta()
MetaOwner(byte) 0public <M extends BlockMeta<Block>> boolean applyMeta(boolean replace, M... meta)
MetaOwnerapplyMeta in interface MetaOwner<BlockMeta<Block>>applyMeta in class AbstractBlockMetaOwner<Block>M - the meta typereplace - true to apply meta anyways if the data mapping already existsmeta - the metadatatrue if the all of the meta changes took effectCopyright © 2016. All rights reserved.