invalidated all tile entities on block change

This commit is contained in:
GameHerobrine 2024-06-01 00:57:17 +03:00
parent c5bdb933ed
commit bbf506c887
2 changed files with 26 additions and 6 deletions

View file

@ -488,8 +488,8 @@ class Level{
$this->level->setBlock($x, $y, $z, $id, $meta);
if($tiles && ($t = $this->server->api->tile->getXYZ($this, $x, $y, $z)) != false){ //TODO rewrite
$t->close();
if($tiles){ //TODO rewrite
$this->server->api->tile->invalidateAll($this, $x, $y, $z);
}
if($updateBlocksAround){
self::updateNeighborsAt($x, $y, $z, $oldID);
@ -723,9 +723,7 @@ class Level{
}
if($tiles === true){
if(($t = $this->server->api->tile->get($pos)) !== false){
$t->close();
}
$this->server->api->tile->invalidateAll($this, $pos->x, $pos->y, $pos->z);
}
if($update === true){