Conver High ItemID to Old ItemId

This commit is contained in:
yefengeeeeeeeeeee 2025-04-25 17:19:22 +08:00
parent 6b7563d8ea
commit fd23ba04ec
9 changed files with 36 additions and 10 deletions

View file

@ -150,8 +150,8 @@ abstract class RakNetDataPacket extends stdClass{
return ord($this->get(1));
}
protected function putSlot(Item $item){
$this->putShort($item->getID());
protected function putSlot(Int $protocolId, Item $item){
$this->putShort(BlockAPI::convertHighItemIdsToOldItemIds($protocolId, $item->getID()));
$this->putByte($item->count);
$this->putShort($item->getMetadata());
}