micro entity optimizations, fixed getEyeHeight, rewrote inWall, static hitboxes

This commit is contained in:
GameHerobrine 2024-02-16 06:36:21 +03:00
parent 0469550ca2
commit 2927fe1094
9 changed files with 54 additions and 94 deletions

View file

@ -5,7 +5,7 @@ class Chicken extends Animal{
public $timeUntilEgg;
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
$this->setSize($this->isBaby() ? 0.2 : 0.4, $this->isBaby() ? 0.35 : 0.7);
$this->setSize(0.4, 0.7);
parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 4, "generic");
$this->setName('Chicken');