data tag for saddled pigs was added(id 16, type:byte)

This commit is contained in:
GameHerobrine 2022-06-24 00:08:06 +03:00
parent 7b5bd27a39
commit 551ae19d7f
2 changed files with 15 additions and 7 deletions

View file

@ -7,7 +7,14 @@ abstract class Animal extends Creature implements Ageable, Breedable{
public function isBaby(){
return $this->data["IsBaby"];
}
public function getMetadata(){
$d = parent::getMetadata();
if(!isset($this->data["IsBaby"])){
$this->data["IsBaby"] = 0;
}
$d[14]["value"] = $this->isBaby();
return $d;
}
public function environmentUpdate(){
if($this->server->api->getProperty("spawn-animals") !== true){
$this->close();