Improve documentation for BlockTypeIds and ItemTypeIds

This commit is contained in:
Dylan K. Taylor 2023-05-27 17:28:36 +01:00
parent b8ba2d03ba
commit 473c062b40
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 11 additions and 8 deletions

View File

@ -24,11 +24,14 @@ declare(strict_types=1);
namespace pocketmine\block;
/**
* Enum of all the block runtime IDs used by PocketMine-MP. These IDs are specific to PocketMine-MP and have no
* relevance to any Minecraft vanilla things.
* Every block in {@link VanillaBlocks} has a corresponding constant in this class. These constants can be used to
* identify and compare block types efficiently using {@link Block::getTypeId()}.
*
* WARNING: DO NOT STORE THESE IDS. They can and will change without warning.
* They should ONLY be used to IDENTIFY blocks at runtime.
* Type ID is also used internally as part of block state ID, which is used to store blocks and their simple properties
* in a memory-efficient way in chunks at runtime.
*
* WARNING: These are NOT a replacement for Minecraft legacy IDs. Do **NOT** hardcode their values, or store them in
* configs or databases. They will change without warning.
*/
final class BlockTypeIds{

View File

@ -24,11 +24,11 @@ declare(strict_types=1);
namespace pocketmine\item;
/**
* Enum of all the item runtime IDs used by PocketMine-MP. These IDs are specific to PocketMine-MP and have no
* relevance to any Minecraft vanilla things.
* Every item in {@link VanillaItems} has a corresponding constant in this class. These constants can be used to
* identify and compare item types efficiently using {@link Item::getTypeId()}.
*
* WARNING: DO NOT STORE THESE IDS. They can and will change without warning.
* They should ONLY be used to IDENTIFY items at runtime.
* WARNING: These are NOT a replacement for Minecraft legacy IDs. Do **NOT** hardcode their values, or store them in
* configs or databases. They will change without warning.
*/
final class ItemTypeIds{