mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Chunk unloading
This commit is contained in:
parent
3f532d419c
commit
244fde8143
4 changed files with 51 additions and 8 deletions
|
|
@ -716,7 +716,6 @@ class BlockAPI{
|
|||
|
||||
public function blockUpdateAround(Position $pos, $type = BLOCK_UPDATE_NORMAL){
|
||||
if(!($pos instanceof Block)){
|
||||
$pos = $pos->floor();
|
||||
$block = $pos->level->getBlock($pos);
|
||||
}else{
|
||||
$block = $pos;
|
||||
|
|
@ -731,7 +730,6 @@ class BlockAPI{
|
|||
|
||||
public function blockUpdate(Position $pos, $type = BLOCK_UPDATE_NORMAL){
|
||||
if(!($pos instanceof Block)){
|
||||
$pos = $pos->floor();
|
||||
$block = $pos->level->getBlock($pos);
|
||||
}else{
|
||||
$block = $pos;
|
||||
|
|
@ -748,7 +746,7 @@ class BlockAPI{
|
|||
if($delay < 0){
|
||||
return false;
|
||||
}
|
||||
$pos = $pos->floor();
|
||||
|
||||
$index = $pos->x.".".$pos->y.".".$pos->z.".".$pos->level->getName();
|
||||
$delay = microtime(true) + $delay * 0.05;
|
||||
if(!isset($this->scheduledUpdates[$index])){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue