mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
isBaby changed to IsBaby, methods for animals were added
This commit is contained in:
parent
327e74e7aa
commit
eb1f1e3d02
9 changed files with 88 additions and 79 deletions
|
|
@ -2,11 +2,18 @@
|
|||
class Pig extends Animal{
|
||||
const TYPE = MOB_PIG;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
console("A constructor which indicates it works! ".":".$eid.":".$class.":".$type);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:10, "generic");
|
||||
$this->update();
|
||||
//$this->setName('Pig');
|
||||
$this->size = $this->isBaby() ? 0.60 : 1.1875;
|
||||
}
|
||||
|
||||
public function getDrops(){
|
||||
return $this->isBaby() ? array() :
|
||||
array(
|
||||
array(($this->fire > 0 ? COOKED_PORKCHOP:RAW_PORKCHOP), 0, 1),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue