mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Fix Block::get() regression introduced in 02f42eba
This commit is contained in:
parent
4ab286a142
commit
1fec16f167
@ -371,12 +371,7 @@ class BlockFactory{
|
||||
*/
|
||||
public static function get(int $id, int $meta = 0, Position $pos = null) : Block{
|
||||
try{
|
||||
$block = self::$fullList[($id << 4) | $meta];
|
||||
if($block !== null){
|
||||
$block = clone $block;
|
||||
}else{
|
||||
$block = new UnknownBlock($id, $meta);
|
||||
}
|
||||
$block = clone self::$fullList[($id << 4) | $meta];
|
||||
}catch(\RuntimeException $e){
|
||||
//TODO: this probably should return null (out of bounds IDs may cause unexpected behaviour)
|
||||
$block = new UnknownBlock($id, $meta);
|
||||
|
Loading…
x
Reference in New Issue
Block a user