Skip to content

Commit

Permalink
LevelDB: stop overriding types from NBT
Browse files Browse the repository at this point in the history
NBT has better quality type info already
  • Loading branch information
dktapps committed Jan 7, 2025
1 parent 689a799 commit e8c4b74
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/world/format/io/leveldb/LevelDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ public function loadChunk(int $chunkX, int $chunkZ) : ?LoadedChunkData{

$nbt = new LittleEndianNbtSerializer();

/** @var CompoundTag[] $entities */
$entities = [];
if(($entityData = $this->db->get($index . ChunkDataKey::ENTITIES)) !== false && $entityData !== ""){
try{
Expand All @@ -721,7 +720,6 @@ public function loadChunk(int $chunkX, int $chunkZ) : ?LoadedChunkData{
}
}

/** @var CompoundTag[] $tiles */
$tiles = [];
if(($tileData = $this->db->get($index . ChunkDataKey::BLOCK_ENTITIES)) !== false && $tileData !== ""){
try{
Expand Down
12 changes: 0 additions & 12 deletions tests/phpstan/configs/dependency-problems.neon
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
parameters:
ignoreErrors:
-
message: '#^Parameter \#3 \$entityNBT of class pocketmine\\world\\format\\io\\ChunkData constructor expects list\<pocketmine\\nbt\\tag\\CompoundTag\>, array\<pocketmine\\nbt\\tag\\CompoundTag\> given\.$#'
identifier: argument.type
count: 1
path: ../../../src/world/format/io/leveldb/LevelDB.php

-
message: '#^Parameter \#4 \$tileNBT of class pocketmine\\world\\format\\io\\ChunkData constructor expects list\<pocketmine\\nbt\\tag\\CompoundTag\>, array\<pocketmine\\nbt\\tag\\CompoundTag\> given\.$#'
identifier: argument.type
count: 1
path: ../../../src/world/format/io/leveldb/LevelDB.php

-
message: '#^Parameter \#1 \$input of class pocketmine\\crafting\\json\\ShapelessRecipeData constructor expects list\<pocketmine\\crafting\\json\\RecipeIngredientData\>, array\<pocketmine\\crafting\\json\\RecipeIngredientData\> given\.$#'
identifier: argument.type
Expand Down

0 comments on commit e8c4b74

Please sign in to comment.