mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
animal breeding added
This commit is contained in:
parent
426728342f
commit
ffd5fa738c
9 changed files with 135 additions and 36 deletions
|
|
@ -687,27 +687,7 @@ class Entity extends Position
|
|||
}
|
||||
|
||||
|
||||
if($this->knockbackTime > 0){
|
||||
--$this->knockbackTime;
|
||||
}
|
||||
if($this->delayBeforePickup > 0){
|
||||
--$this->delayBeforePickup;
|
||||
}
|
||||
if($this->moveTime > 0){
|
||||
--$this->moveTime;
|
||||
}
|
||||
if($this->lookTime > 0){
|
||||
--$this->lookTime;
|
||||
}
|
||||
if($this->idleTime > 0){
|
||||
--$this->idleTime;
|
||||
}
|
||||
|
||||
|
||||
if($this->inAction){
|
||||
++$this->inActionCounter;
|
||||
}
|
||||
|
||||
$this->counterUpdate();
|
||||
|
||||
if($this->lastHeadYaw != $this->headYaw){
|
||||
$this->sendHeadYaw();
|
||||
|
|
@ -1025,7 +1005,30 @@ class Entity extends Position
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function counterUpdate(){
|
||||
if($this->knockbackTime > 0){
|
||||
--$this->knockbackTime;
|
||||
}
|
||||
if($this->delayBeforePickup > 0){
|
||||
--$this->delayBeforePickup;
|
||||
}
|
||||
if($this->moveTime > 0){
|
||||
--$this->moveTime;
|
||||
}
|
||||
if($this->lookTime > 0){
|
||||
--$this->lookTime;
|
||||
}
|
||||
if($this->idleTime > 0){
|
||||
--$this->idleTime;
|
||||
}
|
||||
|
||||
|
||||
if($this->inAction){
|
||||
++$this->inActionCounter;
|
||||
}
|
||||
}
|
||||
|
||||
public function close()
|
||||
{
|
||||
if($this->closed === false){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue