mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
BlockStateData: use array<Tag> instead of CompoundTag to store state properties
this reduces the footprint of RuntimeBlockMapping by a further 1 MB, as well as simplifying various parts of the code, and solidifying the immutability guarantee of BlockStateData.
This commit is contained in:
@ -62,7 +62,7 @@ $reportMap = [];
|
||||
foreach($states as $state){
|
||||
$name = $state->getName();
|
||||
$reportMap[$name] ??= [];
|
||||
foreach($state->getStates() as $propertyName => $value){
|
||||
foreach(Utils::stringifyKeys($state->getStates()) as $propertyName => $value){
|
||||
if($value instanceof IntTag || $value instanceof StringTag){
|
||||
$rawValue = $value->getValue();
|
||||
}elseif($value instanceof ByteTag){
|
||||
|
Reference in New Issue
Block a user