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:
Dylan K. Taylor
2022-07-02 17:48:04 +01:00
parent 323c563684
commit b125d4d25f
13 changed files with 530 additions and 605 deletions

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\data\bedrock\CoralTypeIdMap;
use pocketmine\item\Item;
use pocketmine\math\Facing;
use pocketmine\math\Vector3;
@ -32,10 +31,6 @@ use pocketmine\world\BlockTransaction;
final class Coral extends BaseCoral{
protected function writeStateToItemMeta() : int{
return CoralTypeIdMap::getInstance()->toId($this->coralType);
}
public function readStateFromWorld() : void{
//TODO: this hack ensures correct state of coral plants, because they don't retain their dead flag in metadata
$world = $this->position->getWorld();