everlasting fire fix, small bugfixes

This commit is contained in:
GameHerobrine 2023-11-06 19:58:25 +03:00
parent 4b17c605b4
commit 4e4c392ade
4 changed files with 14 additions and 5 deletions

View file

@ -167,6 +167,9 @@ class LevelAPI{
break; break;
case "save-all": case "save-all":
$output .= "Saving...\n"; $output .= "Saving...\n";
foreach($this->server->clients as $p){
$p->sendChat("Saving world, server might lag a bit...");
}
$save = $this->server->saveEnabled; $save = $this->server->saveEnabled;
$this->server->saveEnabled = true; $this->server->saveEnabled = true;
$this->saveAll(); $this->saveAll();

View file

@ -395,9 +395,6 @@ class Entity extends Position
} else{ } else{
$hasUpdate = true; $hasUpdate = true;
} }
if(($this->player instanceof Player) and ($this->player->gamemode & 0x01) === CREATIVE){ // Remove fire effects in next tick
$this->fire = 1;
}
} }
$startX = floor($this->boundingBox->minX); $startX = floor($this->boundingBox->minX);
@ -470,6 +467,9 @@ class Entity extends Position
if ($this->inBlock(new Vector3($x, $y, $z))) { if ($this->inBlock(new Vector3($x, $y, $z))) {
$this->harm(5, "lava"); $this->harm(5, "lava");
$this->fire = 300; $this->fire = 300;
if($this->isPlayer() and ($this->player->gamemode & 0x01) === CREATIVE){
$this->fire = 1;
}
$this->updateMetadata(); $this->updateMetadata();
$hasUpdate = true; $hasUpdate = true;
} }
@ -478,6 +478,9 @@ class Entity extends Position
if ($this->inBlock(new Vector3($x, $y, $z))) { if ($this->inBlock(new Vector3($x, $y, $z))) {
$this->harm(1, "fire"); $this->harm(1, "fire");
$this->fire = 300; $this->fire = 300;
if($this->isPlayer() and ($this->player->gamemode & 0x01) === CREATIVE){
$this->fire = 1;
}
$this->updateMetadata(); $this->updateMetadata();
$hasUpdate = true; $hasUpdate = true;
} }

View file

@ -69,9 +69,12 @@ class LavaBlock extends LiquidBlock implements LightingBlock{
/*if($this->checkWater()){ /*if($this->checkWater()){
return; return;
}*/ }*/
$falling = $this->meta >> 3; $falling = $this->meta >> 3;
$down = $this->getSide(0); $down = $this->getSide(0);
if($down instanceof WaterBlock) {
$this->level->fastSetBlockUpdate($down->x, $down->y, $down->z, STONE, 0, true);
return;
}
$from = $this->getFrom(); $from = $this->getFrom();
if($from !== null || $level == 0x00){ if($from !== null || $level == 0x00){

View file

@ -34,7 +34,7 @@ class WaterBlock extends LiquidBlock{
} }
$b = $this->getSide($side); $b = $this->getSide($side);
if($b instanceof LavaBlock){ if($b instanceof LavaBlock){
$level = $b->meta & 0x06; $level = $b->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{