mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
movement tweaks
This commit is contained in:
parent
efca0f8398
commit
90d1865cb1
4 changed files with 18 additions and 9 deletions
|
|
@ -22,6 +22,7 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
public function harm($dmg, $cause = "generic", $force = false){
|
||||
$ret = parent::harm($dmg, $cause, $force);
|
||||
$this->inPanic |= ($ret && is_numeric($cause));
|
||||
$this->inLove = false;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
public function breed(){
|
||||
$c = $this->spawnChild();
|
||||
if($this->server->dhandle("entity.animal.breed", ["parent" => $this, "child" => $c]) !== false){
|
||||
$c->parent = &$this;
|
||||
$c->parent = $this;
|
||||
$this->server->api->entity->spawnToAll($c);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue