mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Strip all remaining legacy item ID/meta stuff from blocks
the doors are now finally open, we can: - make all the wood types dynamic - fix glazed terracotta - add all the new blocks LET'S GOOOOOOOOOOOO
This commit is contained in:
@ -32,17 +32,11 @@ class BlockIdentifier{
|
||||
*/
|
||||
public function __construct(
|
||||
private int $blockTypeId,
|
||||
private int $legacyItemId,
|
||||
private int $legacyItemVariant,
|
||||
private ?string $tileClass = null
|
||||
){
|
||||
if($blockTypeId < 0){
|
||||
throw new \InvalidArgumentException("Block type ID may not be negative");
|
||||
}
|
||||
if($legacyItemVariant < 0){
|
||||
throw new \InvalidArgumentException("Legacy item variant may not be negative");
|
||||
}
|
||||
|
||||
if($tileClass !== null){
|
||||
Utils::testValidInstance($tileClass, Tile::class);
|
||||
}
|
||||
@ -50,20 +44,6 @@ class BlockIdentifier{
|
||||
|
||||
public function getBlockTypeId() : int{ return $this->blockTypeId; }
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public function getLegacyVariant() : int{
|
||||
return $this->legacyItemVariant;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public function getLegacyItemId() : int{
|
||||
return $this->legacyItemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return class-string<Tile>|null
|
||||
*/
|
||||
|
Reference in New Issue
Block a user