mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
cleanup
This commit is contained in:
parent
6d430c3440
commit
b84093e4ce
25 changed files with 48 additions and 163 deletions
|
|
@ -1,8 +1,5 @@
|
|||
<?php
|
||||
/*
|
||||
TODO:
|
||||
move methods
|
||||
*/
|
||||
|
||||
abstract class Animal extends Creature implements Ageable, Breedable{
|
||||
|
||||
public $parent;
|
||||
|
|
@ -104,11 +101,11 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
public function interactWith(Entity $e, $action){
|
||||
if($e->isPlayer() && $action === InteractPacket::ACTION_HOLD){
|
||||
$slot = $e->player->getHeldItem();
|
||||
if($this->isFood($slot->getID()) && $this->inLove <= 0 && !$this->isBaby()){ //TODO check vanilla
|
||||
if($this->isFood($slot->getID()) && $this->inLove <= 0 && !$this->isBaby()){
|
||||
if(($e->player->gamemode & 0x01) === SURVIVAL){
|
||||
$e->player->removeItem($slot->getID(), $slot->getMetadata(), 1);
|
||||
}
|
||||
$this->inLove = 600; //600 ticks, original mehod from mcpe
|
||||
$this->inLove = 600;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue