mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
Fixed incorrect parameter checking in BlockFactory::get() (#4476)
This commit is contained in:
parent
1cb540387c
commit
eb80515e99
@ -952,7 +952,7 @@ class BlockFactory{
|
|||||||
* Deserializes a block from the provided legacy ID and legacy meta.
|
* Deserializes a block from the provided legacy ID and legacy meta.
|
||||||
*/
|
*/
|
||||||
public function get(int $id, int $meta) : Block{
|
public function get(int $id, int $meta) : Block{
|
||||||
if($meta < 0 or $meta > (1 << Block::INTERNAL_METADATA_BITS)){
|
if($meta < 0 or $meta >= (1 << Block::INTERNAL_METADATA_BITS)){
|
||||||
throw new \InvalidArgumentException("Block meta value $meta is out of bounds");
|
throw new \InvalidArgumentException("Block meta value $meta is out of bounds");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user