This commit is contained in:
GameHerobrine 2023-10-07 06:06:35 +03:00
commit 2039471e12
4 changed files with 18 additions and 11 deletions

View file

@ -227,7 +227,7 @@ class PocketMinecraftServer{
"url" => $url, "url" => $url,
"data" => [ "data" => [
"username" => $name, "username" => $name,
"content" => $this->extraprops->get("discord-ru-smiles") ? str_replace("@", " ", str_replace("Ы", "<:smile_cool:1007021190294032534>", str_replace("Ь", "<:smile_cry:1007021188490477718>", str_replace("Ъ", "<:smile_happy:1007021186745630851>", str_replace("Ё", "<:smile_neutral:1007021184874979409>", $msg))))) : str_replace("@", "", $msg) "content" => $this->extraprops->get("discord-ru-smiles") ? str_replace("@", " ", str_replace("Ы", "<:imp_cool:1151085500396998719>", str_replace("Ь", "<:imp_badphp5:1151085478410457120>", str_replace("Ъ", "<:imp_gudjava:1151085431962742784>", str_replace("Ё", "<:imp_wut:1151085524241621012>", $msg))))) : str_replace("@", "", $msg)
], ],
], null); ], null);
} }

View file

@ -34,7 +34,7 @@ class LavaBlock extends LiquidBlock implements LightingBlock{
for($side = 0; $side <= 5; ++$side){ for($side = 0; $side <= 5; ++$side){
$b = $this->getSide($side); $b = $this->getSide($side);
if($b instanceof WaterBlock){ if($b instanceof WaterBlock){
$level = $this->meta & 0x06; $level = $this->meta & 0x07;
if($level == 0x00){ if($level == 0x00){
$this->level->setBlock($b, new ObsidianBlock(), false, false, true); $this->level->setBlock($b, new ObsidianBlock(), false, false, true);
}else{ }else{
@ -66,9 +66,9 @@ class LavaBlock extends LiquidBlock implements LightingBlock{
return false; return false;
} }
if($this->checkWater()){ /*if($this->checkWater()){
return; return;
} }*/
$falling = $this->meta >> 3; $falling = $this->meta >> 3;
$down = $this->getSide(0); $down = $this->getSide(0);

View file

@ -27,22 +27,23 @@ class WaterBlock extends LiquidBlock{
} }
public function checkLava(){ public function checkLava(){
$ret = false;
for($side = 0; $side <= 5; ++$side){ for($side = 0; $side <= 5; ++$side){
if($side == 1){ if($side == 1){
continue; continue;
} }
$b = $this->getSide($side); $b = $this->getSide($side);
if($b instanceof LavaBlock){ if($b instanceof LavaBlock){
$level = $b->meta & 0x07; $level = $b->meta & 0x06;
if($level == 0x00){ if($level == 0x00){
$this->level->setBlock($b, new ObsidianBlock(), false, false, true); $this->level->setBlock($b, new ObsidianBlock(), false, false, true);
}else{ }else{
$this->level->setBlock($b, new CobblestoneBlock(), false, false, true); $this->level->setBlock($b, new CobblestoneBlock(), false, false, true);
} }
return true; $ret = true;
} }
} }
return false; return $ret;
} }
public function getFrom(){ public function getFrom(){
@ -118,4 +119,4 @@ class WaterBlock extends LiquidBlock{
} }
return false; return false;
} }
} }

View file

@ -25,7 +25,7 @@ class BucketItem extends Item{
} }
}elseif($this->meta === WATER){ }elseif($this->meta === WATER){
//Support Make Non-Support Water to Support Water //Support Make Non-Support Water to Support Water
if($block->getID() === AIR || ( $block instanceof WaterBlock && ($block->getMetadata() & 0x07) != 0x00 ) ){ if($block->getID() === AIR || ( $block instanceof WaterBlock && ($block->getMetadata() & 0x07) != 0x00 ) || ($block instanceof LavaBlock)){
$water = new WaterBlock(); $water = new WaterBlock();
$level->setBlock($block, $water, true, false, true); $level->setBlock($block, $water, true, false, true);
ServerAPI::request()->api->block->scheduleBlockUpdate($block, 5, BLOCK_UPDATE_NORMAL); ServerAPI::request()->api->block->scheduleBlockUpdate($block, 5, BLOCK_UPDATE_NORMAL);
@ -36,7 +36,7 @@ class BucketItem extends Item{
return true; return true;
} }
}elseif($this->meta === LAVA){ }elseif($this->meta === LAVA){
if($block->getID() === AIR){ if($block->getID() === AIR || ($block instanceof LavaBlock && ($block->getMetadata() & 0x6) != 0)){
$lava = new LavaBlock(); $lava = new LavaBlock();
$level->setBlock($block, $lava, true, false, true); $level->setBlock($block, $lava, true, false, true);
ServerAPI::request()->api->block->scheduleBlockUpdate($block, 40, BLOCK_UPDATE_NORMAL); ServerAPI::request()->api->block->scheduleBlockUpdate($block, 40, BLOCK_UPDATE_NORMAL);
@ -45,8 +45,14 @@ class BucketItem extends Item{
$this->meta = 0; $this->meta = 0;
} }
return true; 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; return false;
} }
} }