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

@@ -428,16 +428,15 @@ class Item implements \JsonSerializable{
}
final public function getTypeId() : int{
//don't use Item::getMeta(), since it might be overridden for non-type information (e.g. durability)
return ($this->identifier->getId() << 16) | $this->identifier->getMeta();
return $this->identifier->getTypeId();
}
public function getId() : int{
return $this->identifier->getId();
return $this->identifier->getLegacyId();
}
public function getMeta() : int{
return $this->identifier->getMeta();
return $this->identifier->getLegacyMeta();
}
/**