Mark chunk to be saved when removing invalid entities/tiles

This commit is contained in:
Shoghi Cervantes 2014-10-27 18:43:58 +01:00
parent 809fc44813
commit f6aac8728b

View File

@ -146,10 +146,12 @@ abstract class BaseFullChunk implements FullChunk{
foreach($this->NBTtiles as $nbt){
if($nbt instanceof Compound){
if(!isset($nbt->id)){
$this->setChanged();
continue;
}
if(($nbt["x"] >> 4) !== $this->x or ($nbt["z"] >> 4) !== $this->z){
$this->setChanged();
continue; //Fixes tiles allocated in wrong chunks.
}