mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
classes for all animals, moved construcors
This commit is contained in:
parent
efa2e11497
commit
327e74e7aa
8 changed files with 59 additions and 43 deletions
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
class Cow extends Animal{
|
||||
const TYPE = MOB_COW;
|
||||
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('Cow');
|
||||
$this->size = $this->isBaby() ? 0.65 : 1.4;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue