mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
infinite obsidian generator should be fixed
This commit is contained in:
parent
833b04e0fc
commit
1545903159
3 changed files with 13 additions and 7 deletions
|
|
@ -36,7 +36,7 @@ class BucketItem extends Item{
|
|||
return true;
|
||||
}
|
||||
}elseif($this->meta === LAVA){
|
||||
if($block->getID() === AIR){
|
||||
if($block->getID() === AIR || ($block instanceof LavaBlock && ($block->getMetadata() & 0x6) != 0)){
|
||||
$lava = new LavaBlock();
|
||||
$level->setBlock($block, $lava, true, false, true);
|
||||
ServerAPI::request()->api->block->scheduleBlockUpdate($block, 40, BLOCK_UPDATE_NORMAL);
|
||||
|
|
@ -45,8 +45,14 @@ class BucketItem extends Item{
|
|||
$this->meta = 0;
|
||||
}
|
||||
return true;
|
||||
}elseif($block instanceof WaterBlock){
|
||||
$level->setBlock($block, new ObsidianBlock(), true, false, true);
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$this->meta = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue