mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
water damage tweaks, using php8 pack functions
This commit is contained in:
parent
229a563ff5
commit
68b8232f07
17 changed files with 46 additions and 76 deletions
|
|
@ -3,6 +3,7 @@
|
|||
class Sheep extends Animal{
|
||||
public $color;
|
||||
const TYPE = MOB_SHEEP;
|
||||
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.675 : 1.3);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
|
|
@ -11,9 +12,9 @@ class Sheep extends Animal{
|
|||
$this->data["Sheared"] = isset($this->data["Sheared"]) ? $this->data["Sheared"] : 0;
|
||||
$this->data["Color"] = isset($this->data["Color"]) ? $this->data["Color"] : $this->sheepColor();
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
$this->ai->addTask(new TaskEatTileGoal());
|
||||
}
|
||||
|
||||
public function createSaveData(){
|
||||
$data = parent::createSaveData();
|
||||
$data["Color"] = @$this->data["Color"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue