mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
onTick update is toggleable in extra.props.
This commit is contained in:
parent
1448fd21b9
commit
08f9193191
5 changed files with 29 additions and 12 deletions
|
|
@ -329,7 +329,16 @@ class Level{
|
|||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function onTick(PocketMinecraftServer $server){
|
||||
$ents = $server->api->entity->getAll($this);
|
||||
foreach($ents as $e){
|
||||
if($e->needsUpdate){
|
||||
$e->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setBlock(Vector3 $pos, Block $block, $update = true, $tiles = false, $direct = false){
|
||||
if(!isset($this->level) or (($pos instanceof Position) and $pos->level !== $this) or $pos->x < 0 or $pos->y < 0 or $pos->z < 0){
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue