mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs
This commit is contained in:
@ -56,7 +56,7 @@ class Anvil extends McRegion{
|
||||
if($subChunk->isEmpty()){
|
||||
continue;
|
||||
}
|
||||
$nbt->Sections[++$subChunks] = new CompoundTag(null, [
|
||||
$nbt->Sections[++$subChunks] = new CompoundTag("", [
|
||||
"Y" => new ByteTag("Y", $y),
|
||||
"Blocks" => new ByteArrayTag("Blocks", ChunkUtils::reorderByteArray($subChunk->getBlockIdArray())), //Generic in-memory chunks are currently always XZY
|
||||
"Data" => new ByteArrayTag("Data", ChunkUtils::reorderNibbleArray($subChunk->getBlockDataArray())),
|
||||
|
@ -59,7 +59,7 @@ class PMAnvil extends Anvil{
|
||||
if($subChunk->isEmpty()){
|
||||
continue;
|
||||
}
|
||||
$nbt->Sections[++$subChunks] = new CompoundTag(null, [
|
||||
$nbt->Sections[++$subChunks] = new CompoundTag("", [
|
||||
"Y" => new ByteTag("Y", $y),
|
||||
"Blocks" => new ByteArrayTag("Blocks", $subChunk->getBlockIdArray()),
|
||||
"Data" => new ByteArrayTag("Data", $subChunk->getBlockDataArray()),
|
||||
|
Reference in New Issue
Block a user