mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Entity collisions, bounding boxes for entites and blocks
This commit is contained in:
parent
9154c0fc3d
commit
1448fd21b9
19 changed files with 265 additions and 118 deletions
|
|
@ -7,9 +7,9 @@ class Chicken extends Animal{
|
|||
$server = ServerAPI::request();
|
||||
$server->schedule(mt_rand(0,6000) + 6000, array($this, "dropAnEgg"));
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 4, "generic");
|
||||
$this->update();
|
||||
$this->setName('Chicken');
|
||||
$this->size = $this->isBaby() ? 0.35 : 0.7;
|
||||
$this->setSize($this->isBaby() ? 0.2 : 0.4, $this->isBaby() ? 0.35 : 0.7);
|
||||
$this->update();
|
||||
}
|
||||
public function isFood($id){
|
||||
return $id === PUMPKIN_SEEDS || $id === MELON_SEEDS || $id === BEETROOT_SEEDS || $id === WHEAT_SEEDS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue