mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-22 19:34:02 +00:00
TypeConverter: fixed crash on unknown blockitems (#5729)
morton2d_encode is 64-bit function when NBT int tag is 32-bit only, resulting in crash
This commit is contained in:
parent
728e0bc869
commit
17fe894229
@ -188,7 +188,7 @@ class TypeConverter{
|
|||||||
if($nbt === null){
|
if($nbt === null){
|
||||||
$nbt = new CompoundTag();
|
$nbt = new CompoundTag();
|
||||||
}
|
}
|
||||||
$nbt->setInt(self::PM_ID_TAG, morton2d_encode($itemStack->getTypeId(), $itemStack->computeTypeData()));
|
$nbt->setLong(self::PM_ID_TAG, morton2d_encode($itemStack->getTypeId(), $itemStack->computeTypeData()));
|
||||||
}else{
|
}else{
|
||||||
[$id, $meta, $blockRuntimeId] = $idMeta;
|
[$id, $meta, $blockRuntimeId] = $idMeta;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user