mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +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){
|
public function initChunk(Level $level){
|
||||||
if(!$this->isInit){
|
if(!$this->isInit){
|
||||||
$changed = false;
|
$changed = false;
|
||||||
if($this->NBTentities !== null){
|
|
||||||
$level->timings->syncChunkLoadEntitiesTimer->startTiming();
|
$level->timings->syncChunkLoadEntitiesTimer->startTiming();
|
||||||
foreach($this->NBTentities as $nbt){
|
foreach($this->NBTentities as $nbt){
|
||||||
if($nbt instanceof CompoundTag){
|
if($nbt instanceof CompoundTag){
|
||||||
@ -716,6 +716,7 @@ class Chunk{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->NBTentities = [];
|
||||||
$level->timings->syncChunkLoadEntitiesTimer->stopTiming();
|
$level->timings->syncChunkLoadEntitiesTimer->stopTiming();
|
||||||
|
|
||||||
$level->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
$level->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
||||||
@ -733,12 +734,9 @@ class Chunk{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->NBTtiles = [];
|
||||||
$level->timings->syncChunkLoadTileEntitiesTimer->stopTiming();
|
$level->timings->syncChunkLoadTileEntitiesTimer->stopTiming();
|
||||||
|
|
||||||
$this->NBTentities = null;
|
|
||||||
$this->NBTtiles = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->hasChanged = $changed;
|
$this->hasChanged = $changed;
|
||||||
|
|
||||||
$this->isInit = true;
|
$this->isInit = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user