mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
bonemeal on sugarcane tweaks, using block send queue to send UpdateBlockPackets
This commit is contained in:
parent
7ecfcacec6
commit
229a563ff5
8 changed files with 84 additions and 70 deletions
|
|
@ -536,15 +536,13 @@ class BlockAPI{
|
|||
if($block === false){
|
||||
return false;
|
||||
}
|
||||
if($type === BLOCK_UPDATE_RANDOM) return false; //I HATE U NO
|
||||
|
||||
$level = $block->onUpdate($type);
|
||||
if($level === BLOCK_UPDATE_NORMAL){
|
||||
$this->blockUpdateAround($block, $level);
|
||||
$this->server->api->entity->updateRadius($pos, 1);
|
||||
}elseif($level === BLOCK_UPDATE_RANDOM){
|
||||
//$this->nextRandomUpdate($pos); old version, change back if any issues will start to happen with this one(please note that old version makes a lot of lag)
|
||||
//NO $this->scheduleBlockUpdate($pos, (mt_rand(25, 75) + Utils::getRandomUpdateTicks() * 0.05) / 0.05, BLOCK_UPDATE_RANDOM);
|
||||
}
|
||||
|
||||
return $level;
|
||||
}
|
||||
public function blockUpdateAround(Position $pos, $type = BLOCK_UPDATE_NORMAL, $delay = false){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue