removed some useless stuff from explosion, onPlace should be called every ti

This commit is contained in:
GameHerobrine 2024-05-24 06:57:52 +03:00
parent 9c21a984cd
commit 5d5099c06f
3 changed files with 17 additions and 15 deletions

View file

@ -369,7 +369,14 @@ class PMFLevel extends PMF{
$aX = $x & 0xf;
$aZ = $z & 0xf;
$aY = $y & 0xf;
$this->chunks[$index][$Y][(int) ($aY + ($aX << 5) + ($aZ << 9))] = chr($block);
$bind = (int) ($aY + ($aX << 5) + ($aZ << 9));
if($this->chunks[$index][$Y][$bind] == chr($block)){
return false; //no changes done
}else{
$this->chunks[$index][$Y][$bind] = chr($block);
if($block > 0) StaticBlock::getBlock($block)::onPlace($this->level, $x, $y, $z);
}
if(!isset($this->chunkChange[$index][$Y])){
$this->chunkChange[$index][$Y] = 1;
}else{