mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
Block: improve documentation of type ID and state ID
This commit is contained in:
parent
cbb58d3e0d
commit
4692552fdc
@ -105,10 +105,14 @@ class Block{
|
|||||||
return $this->fallbackName;
|
return $this->fallbackName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a type ID that identifies this type of block. This does not include information like facing, open/closed,
|
* Returns a type ID that identifies this type of block. This allows comparing basic block types, e.g. wool, stone,
|
||||||
* powered/unpowered, etc.
|
* glass, etc.
|
||||||
|
*
|
||||||
|
* This does **NOT** include information like facing, open/closed, powered/unpowered, colour, etc. This means that,
|
||||||
|
* for example, red wool and green wool have the same type ID.
|
||||||
|
*
|
||||||
|
* @see BlockTypeIds
|
||||||
*/
|
*/
|
||||||
public function getTypeId() : int{
|
public function getTypeId() : int{
|
||||||
return $this->idInfo->getBlockTypeId();
|
return $this->idInfo->getBlockTypeId();
|
||||||
@ -120,6 +124,11 @@ class Block{
|
|||||||
* Returns the full blockstate ID of this block. This is a compact way of representing a blockstate used to store
|
* Returns the full blockstate ID of this block. This is a compact way of representing a blockstate used to store
|
||||||
* blocks in chunks at runtime.
|
* blocks in chunks at runtime.
|
||||||
*
|
*
|
||||||
|
* This usually encodes all properties of the block, such as facing, open/closed, powered/unpowered, colour, etc.
|
||||||
|
* However, some blocks (such as signs and chests) may store additional properties in an associated "tile" if they
|
||||||
|
* have too many possible values to be encoded into the state ID. These extra properties are **NOT** included in
|
||||||
|
* this function's result.
|
||||||
|
*
|
||||||
* This ID can be used to later obtain a copy of this block using {@link RuntimeBlockStateRegistry::fromStateId()}.
|
* This ID can be used to later obtain a copy of this block using {@link RuntimeBlockStateRegistry::fromStateId()}.
|
||||||
*/
|
*/
|
||||||
public function getStateId() : int{
|
public function getStateId() : int{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user