mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
TypeConverter: port 5fd685e07d
to modern-world-support
This commit is contained in:
@ -233,6 +233,9 @@ class TypeConverter{
|
||||
$compound = null;
|
||||
}
|
||||
if($meta !== null){
|
||||
if($id !== null && ($id < -0x8000 || $id >= 0x7fff)){
|
||||
throw new TypeConversionException("Item ID must be in range " . -0x8000 . " ... " . 0x7fff . " (received $id)");
|
||||
}
|
||||
if($meta < 0 || $meta >= 0x7fff){ //this meta value may have been restored from the NBT
|
||||
throw new TypeConversionException("Item meta must be in range 0 ... " . 0x7fff . " (received $meta)");
|
||||
}
|
||||
|
Reference in New Issue
Block a user