Sign

Sign with methods to get and set the text.

Constructors

this
this(sul.blocks.Block data, string a, string b, string c, string d)
Undocumented in source.
this
this(sul.blocks.Block data)
Undocumented in source.
this
this(sul.blocks.Block data, string[uint] texts)
Undocumented in source.

Members

Functions

drops
Slot[] drops(World world, Player player, Item item)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
string[4] opIndex()

Gets the array with the text in the four lines.

opIndex
string opIndex(size_t index)

Gets the text at the given line.

opIndexAssign
void opIndexAssign(string[4] texts)

Sets all the four lines of the sign.

opIndexAssign
void opIndexAssign(string text)

Sets the given texts in every line of the sign.

opIndexAssign
void opIndexAssign(string text, size_t index)

Sets the text at the given line.

parseJavaCompound
void parseJavaCompound(Compound compound)
Undocumented in source. Be warned that the author may not have intended to support it.
parsePocketCompound
void parsePocketCompound(Compound compound)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

action
ubyte action [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
empty
bool empty [@property getter]

Checks whether or not every sign's line is an empty string.

javaCompound
Compound javaCompound [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
javaSpawnId
string javaSpawnId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
pocketCompound
Compound pocketCompound [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
pocketSpawnId
string pocketSpawnId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

FIRST_LINE
size_t FIRST_LINE;
FOURTH_LINE
size_t FOURTH_LINE;
SECOND_LINE
size_t SECOND_LINE;
THIRD_LINE
size_t THIRD_LINE;

Indicates the line.

Inherited Members

From Tile

tid
uint tid [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
javaSpawnId
string javaSpawnId [@property getter]
pocketSpawnId
string pocketSpawnId [@property getter]

Gets the tile's spawn id for Minecraft and Minecraft: Pocket Edition. They're usually in snake case in Minecraft (flower_pot) and in pascal case in Minecraft: Pocket Edition (FlowerPot).

javaCompound
Compound javaCompound [@property getter]
pocketCompound
Compound pocketCompound [@property getter]

Gets the named binary tag. The tag may be null if the tile does not exists in the game's version or when the tile is in its inital state (or empty).

parseJavaCompound
void parseJavaCompound(Compound compound)

Parses a non-null compound saved in the Minecraft's Anvil format.

parsePocketCompound
void parsePocketCompound(Compound compound)

Parses a non-null compound saved from a Minecraft: Pocket Edition's LevelDB format.

place
void place(World world, BlockPosition position)
Undocumented in source. Be warned that the author may not have intended to support it.
unplace
void unplace()
Undocumented in source. Be warned that the author may not have intended to support it.
placed
bool placed [@property getter]

Indicates whether the tile has been placed in a world.

world
World world [@property getter]

Gets the world the tile is placed in, if placed is true.

position
BlockPosition position [@property getter]

Gets the tile's position in the world, if placed.

action
ubyte action [@property getter]

Gets the action type of the tile, used in Minecraft's UpdateBlockEntity packet.

update
void update()
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

auto sign = world.tileAt!Sign(10, 44, 90);
if(sign !is null) {
   sign[1] = "Click to go to";
   sign[2] = "world";
   assert(sign[] == ["", "Click to go to", "world", ""]);
}

Meta