mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 18:36:40 +00:00
Chunk: remove useless instanceof checks
these are always CompoundTags, and if they aren't we have a bug somewhere else.
This commit is contained in:
parent
2f325b8c91
commit
e1ddf90695
@ -687,7 +687,6 @@ class Chunk{
|
||||
|
||||
$level->timings->syncChunkLoadEntitiesTimer->startTiming();
|
||||
foreach($this->NBTentities as $nbt){
|
||||
if($nbt instanceof CompoundTag){
|
||||
if(!$nbt->hasTag("id")){ //allow mixed types (because of leveldb)
|
||||
$changed = true;
|
||||
continue;
|
||||
@ -705,13 +704,11 @@ class Chunk{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->NBTentities = [];
|
||||
$level->timings->syncChunkLoadEntitiesTimer->stopTiming();
|
||||
|
||||
$level->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
||||
foreach($this->NBTtiles as $nbt){
|
||||
if($nbt instanceof CompoundTag){
|
||||
if(!$nbt->hasTag(Tile::TAG_ID, StringTag::class)){
|
||||
$changed = true;
|
||||
continue;
|
||||
@ -722,7 +719,6 @@ class Chunk{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->NBTtiles = [];
|
||||
$level->timings->syncChunkLoadTileEntitiesTimer->stopTiming();
|
||||
|
Loading…
x
Reference in New Issue
Block a user