This commit is contained in:
kotyara 2024-03-15 20:13:32 +05:00 • committed by GitHub
parent 437576a981
commit a4b7fbf2df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 24 additions and 24 deletions

View file

@ -65,7 +65,7 @@ abstract class Animal extends Creature implements Ageable, Breedable{
}
if($this->isInLove() && !isset($this->level->entitiesInLove[$this->eid])){
$this->level->entitiesInLove[$this->eid] = true;
}else if(!$this->isInLove() && isset($this->level->entitiesInLove[$this->eid])){
}elseif(!$this->isInLove() && isset($this->level->entitiesInLove[$this->eid])){
unset($this->level->entitiesInLove[$this->eid]);
}
}

View file

@ -703,7 +703,7 @@ class Entity extends Position
++$this->fire;
if($this->fire == 0) $this->fire = 8;
}
}else if($this->fire <= 0){
}elseif($this->fire <= 0){
$this->fire = -$this->fireResistance;
}

View file

@ -179,7 +179,7 @@ abstract class Living extends Entity implements Pathfindable{
if($this->isCollidedHorizontally && $this->isFree($this->speedX, $this->speedY + 0.6 - $this->y + $prevPosY, $this->speedZ)){
$this->speedY = 0.3;
}
}else if($this->inLava){
}elseif($this->inLava){
$prevPosY = $this->y;
$this->moveFlying($strafe, $forward, 0.02);
$this->move($this->speedX, $this->speedY, $this->speedZ);

View file

@ -27,7 +27,7 @@ class Spider extends Monster{
$this->speedY = 0.4;
}
return false;
}else if($distance <= 2.0){
}elseif($distance <= 2.0){
return parent::attackEntity($entity, $distance);
}

View file

@ -43,7 +43,7 @@ class FallingSand extends Entity{
$this->close();
//TODO vanilla-like checking?
$this->level->fastSetBlockUpdate($x, $y, $z, $this->data["Tile"], 0); //TODO add metadata
}else if(($blockAt = $this->level->level->getBlockID($x, $y, $z)) != 0){
}elseif(($blockAt = $this->level->level->getBlockID($x, $y, $z)) != 0){
//TODO vanilla-like checking?
if(StaticBlock::getIsTransparent($blockAt) && !StaticBlock::getIsLiquid($blockAt)){
$this->close();