mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
water damage tweaks, using php8 pack functions
This commit is contained in:
parent
229a563ff5
commit
68b8232f07
17 changed files with 46 additions and 76 deletions
|
|
@ -10,7 +10,6 @@ class Creeper extends Monster{
|
|||
$this->setName("Creeper");
|
||||
$this->ignited = 0;
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
$this->timeUntilExplode = $this->isIgnited() ? self::EXPL_TIME : 0;
|
||||
}
|
||||
|
||||
|
|
@ -58,8 +57,8 @@ class Creeper extends Monster{
|
|||
}
|
||||
|
||||
}
|
||||
public function update(){
|
||||
if($this->isIgnited() && $this->target instanceof Entity && Utils::distance_noroot($this->target, $this) > 49){
|
||||
public function update($now){
|
||||
if($this->isIgnited() && $this->target instanceof Entity && Utils::distance_noroot($this->target, $this) > 49){ //TODO move somewhere else
|
||||
$this->setIgnited(-1); //broken in vanilla too
|
||||
$this->timeUntilExplode = 0;
|
||||
}
|
||||
|
|
@ -69,7 +68,7 @@ class Creeper extends Monster{
|
|||
if($this->timeUntilExplode >= 0){
|
||||
--$this->timeUntilExplode;
|
||||
}
|
||||
parent::update();
|
||||
parent::update($now);
|
||||
}
|
||||
|
||||
public function explode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue