mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
BlockFactory: partial revert of 515e4aabc45c057e215e5f695a94a7bd7b0e1094
it's necessary to register these to fill the static property arrays. Someday these won't be necessary I hope...
This commit is contained in:
parent
6047810113
commit
ec28612a12
@ -323,6 +323,12 @@ class BlockFactory{
|
|||||||
//TODO: STRUCTURE_BLOCK
|
//TODO: STRUCTURE_BLOCK
|
||||||
|
|
||||||
//TODO: RESERVED6
|
//TODO: RESERVED6
|
||||||
|
|
||||||
|
for($id = 0, $size = self::$fullList->getSize() >> 4; $id < $size; ++$id){
|
||||||
|
if(self::$fullList[$id << 4] === null){
|
||||||
|
self::registerBlock(new UnknownBlock($id));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -375,8 +381,8 @@ class BlockFactory{
|
|||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if(self::$fullList !== null and self::$fullList[$idx = ($id << 4) | $meta] !== null){
|
if(self::$fullList !== null){
|
||||||
$block = clone self::$fullList[$idx];
|
$block = clone self::$fullList[($id << 4) | $meta];
|
||||||
}else{
|
}else{
|
||||||
$block = new UnknownBlock($id, $meta);
|
$block = new UnknownBlock($id, $meta);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user