Block: added documentation for describeType() and describeState()

This commit is contained in:
Dylan K. Taylor 2023-03-02 17:31:52 +00:00
parent e15e53859f
commit 972f107972
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -261,10 +261,26 @@ class Block{
return $writer->getValue();
}
/**
* Describes properties of this block which apply to both the block and item form of the block.
* Examples of suitable properties include colour, skull type, and any other information which **IS** kept when the
* block is mined or block-picked.
*
* The method implementation must NOT use conditional logic to determine which properties are written. It must
* always write the same properties in the same order, regardless of the current state of the block.
*/
protected function describeType(RuntimeDataDescriber $w) : void{
//NOOP
}
/**
* Describes properties of this block which apply only to the block form of the block.
* Examples of suitable properties include facing, open/closed, powered/unpowered, on/off, and any other information
* which **IS NOT** kept when the block is mined or block-picked.
*
* The method implementation must NOT use conditional logic to determine which properties are written. It must
* always write the same properties in the same order, regardless of the current state of the block.
*/
protected function describeState(RuntimeDataDescriber $w) : void{
//NOOP
}