mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 06:55:29 +00:00
Mark chunk to be saved when removing invalid entities/tiles
This commit is contained in:
parent
809fc44813
commit
f6aac8728b
@ -146,10 +146,12 @@ abstract class BaseFullChunk implements FullChunk{
|
|||||||
foreach($this->NBTtiles as $nbt){
|
foreach($this->NBTtiles as $nbt){
|
||||||
if($nbt instanceof Compound){
|
if($nbt instanceof Compound){
|
||||||
if(!isset($nbt->id)){
|
if(!isset($nbt->id)){
|
||||||
|
$this->setChanged();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($nbt["x"] >> 4) !== $this->x or ($nbt["z"] >> 4) !== $this->z){
|
if(($nbt["x"] >> 4) !== $this->x or ($nbt["z"] >> 4) !== $this->z){
|
||||||
|
$this->setChanged();
|
||||||
continue; //Fixes tiles allocated in wrong chunks.
|
continue; //Fixes tiles allocated in wrong chunks.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user