From 972f107972f931bf658e8ab730d25de8e365704c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 2 Mar 2023 17:31:52 +0000 Subject: [PATCH] Block: added documentation for describeType() and describeState() --- src/block/Block.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/block/Block.php b/src/block/Block.php index aed558241..fb43a214f 100644 --- a/src/block/Block.php +++ b/src/block/Block.php @@ -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 }