public class SignBlock extends BaseBlock implements TileEntityBlock
Constructor and Description |
---|
SignBlock(int type,
int data)
Construct the sign without text.
|
SignBlock(int type,
int data,
java.lang.String[] text)
Construct the sign with text.
|
Modifier and Type | Method and Description |
---|---|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
java.lang.String |
getNbtId()
Return the name of the title entity ID.
|
java.lang.String[] |
getText()
Get the text.
|
boolean |
hasNbtData()
Returns whether the block contains NBT data.
|
void |
setNbtData(CompoundTag rootTag)
Set the object's NBT data (tile entity data).
|
void |
setText(java.lang.String[] text)
Set the text.
|
containsFuzzy, cycleData, equals, equalsFuzzy, flip, flip, getData, getId, getType, hashCode, hasWildcardData, inIterable, internalSetData, internalSetId, isAir, rotate90, rotate90Reverse, setData, setId, setIdAndData, setType, toString
public SignBlock(int type, int data)
type
- type IDdata
- data value (orientation)public SignBlock(int type, int data, java.lang.String[] text)
type
- type IDdata
- data value (orientation)text
- lines of textpublic java.lang.String[] getText()
public void setText(java.lang.String[] text)
text
- the text to setpublic boolean hasNbtData()
NbtValued
NbtValued.getNbtData()
must not return null if this method returns true.hasNbtData
in interface NbtValued
hasNbtData
in class BaseBlock
public java.lang.String getNbtId()
TileEntityBlock
getNbtId
in interface TileEntityBlock
getNbtId
in class BaseBlock
public CompoundTag getNbtData()
NbtValued
NbtValued.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 NbtValued
getNbtData
in class BaseBlock
public void setNbtData(CompoundTag rootTag)
NbtValued
setNbtData
in interface NbtValued
setNbtData
in class BaseBlock
rootTag
- NBT data, or null if no data