mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
invalidated all tile entities on block change
This commit is contained in:
parent
c5bdb933ed
commit
bbf506c887
2 changed files with 26 additions and 6 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue