mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 07:54:19 +00:00
BlockFactory: Be aware of potential size changes to metadata bits
during testing I found the need to use more bits (for example, bells have 32 states in 1.12).
This commit is contained in:
parent
17d0767db5
commit
19e81b0cd3
@ -94,12 +94,12 @@ class BlockFactory{
|
||||
public $blastResistance;
|
||||
|
||||
public function __construct(){
|
||||
$this->fullList = new \SplFixedArray(16384);
|
||||
$this->fullList = new \SplFixedArray(1024 << Block::INTERNAL_METADATA_BITS);
|
||||
|
||||
$this->light = \SplFixedArray::fromArray(array_fill(0, 16384, 0));
|
||||
$this->lightFilter = \SplFixedArray::fromArray(array_fill(0, 16384, 1));
|
||||
$this->blocksDirectSkyLight = \SplFixedArray::fromArray(array_fill(0, 16384, false));
|
||||
$this->blastResistance = \SplFixedArray::fromArray(array_fill(0, 16384, 0.0));
|
||||
$this->light = \SplFixedArray::fromArray(array_fill(0, 1024 << Block::INTERNAL_METADATA_BITS, 0));
|
||||
$this->lightFilter = \SplFixedArray::fromArray(array_fill(0, 1024 << Block::INTERNAL_METADATA_BITS, 1));
|
||||
$this->blocksDirectSkyLight = \SplFixedArray::fromArray(array_fill(0, 1024 << Block::INTERNAL_METADATA_BITS, false));
|
||||
$this->blastResistance = \SplFixedArray::fromArray(array_fill(0, 1024 << Block::INTERNAL_METADATA_BITS, 0.0));
|
||||
|
||||
$railBreakInfo = new BlockBreakInfo(0.7);
|
||||
$this->register(new ActivatorRail(new BID(Ids::ACTIVATOR_RAIL, 0), "Activator Rail", $railBreakInfo));
|
||||
|
Loading…
x
Reference in New Issue
Block a user