Assign auto-generated runtime type IDs to all items

This commit is contained in:
Dylan K. Taylor
2022-06-29 13:50:58 +01:00
parent 56428e8a4e
commit dd63681f94
10 changed files with 584 additions and 293 deletions

View File

@ -91,11 +91,19 @@ class Block{
public function asItem() : Item{
return ItemFactory::getInstance()->get(
$this->idInfo->getLegacyItemId(),
$this->idInfo->getLegacyVariant() | $this->writeStateToItemMeta()
$this->getLegacyItemId(),
$this->getLegacyItemMeta()
);
}
public function getLegacyItemId() : int{
return $this->idInfo->getLegacyItemId();
}
public function getLegacyItemMeta() : int{
return $this->idInfo->getLegacyVariant() | $this->writeStateToItemMeta();
}
protected function writeStateToItemMeta() : int{
return 0;
}