mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Chunk: clean up nonsensical code in initChunk()
I have no idea why the extra check was there, or why the null assignment was used, because it doesn't make any sense.
This commit is contained in:
parent
fee3c17148
commit
17037f5e9c
@ -694,7 +694,7 @@ class Chunk{
|
||||
public function initChunk(Level $level){
|
||||
if(!$this->isInit){
|
||||
$changed = false;
|
||||
if($this->NBTentities !== null){
|
||||
|
||||
$level->timings->syncChunkLoadEntitiesTimer->startTiming();
|
||||
foreach($this->NBTentities as $nbt){
|
||||
if($nbt instanceof CompoundTag){
|
||||
@ -716,6 +716,7 @@ class Chunk{
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->NBTentities = [];
|
||||
$level->timings->syncChunkLoadEntitiesTimer->stopTiming();
|
||||
|
||||
$level->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
||||
@ -733,12 +734,9 @@ class Chunk{
|
||||
}
|
||||
}
|
||||
|
||||
$this->NBTtiles = [];
|
||||
$level->timings->syncChunkLoadTileEntitiesTimer->stopTiming();
|
||||
|
||||
$this->NBTentities = null;
|
||||
$this->NBTtiles = null;
|
||||
}
|
||||
|
||||
$this->hasChanged = $changed;
|
||||
|
||||
$this->isInit = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user