mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
isBaby changed to IsBaby, methods for animals were added
This commit is contained in:
parent
327e74e7aa
commit
eb1f1e3d02
9 changed files with 88 additions and 79 deletions
|
|
@ -133,7 +133,7 @@ class EntityAPI{
|
|||
$isBaby = 0;
|
||||
if(strtolower($args[2]) == 'baby'){//summon <mob> [amount] [baby]
|
||||
if($type > 13){
|
||||
$output .= "Baby can be only animals!";
|
||||
$output .= "This mob cant be baby!";
|
||||
break;
|
||||
}
|
||||
$isBaby = 1;
|
||||
|
|
@ -150,7 +150,7 @@ class EntityAPI{
|
|||
"y" => $spawnY,
|
||||
"z" => $spawnZ,
|
||||
"Health" => $this->hp[$type],
|
||||
"isBaby" => $isBaby,
|
||||
"IsBaby" => $isBaby,
|
||||
));
|
||||
$this->spawnToAll($entityit, $level);
|
||||
}
|
||||
|
|
@ -272,8 +272,8 @@ class EntityAPI{
|
|||
$eid = $this->eCnt++;
|
||||
$efl = EntityRegistry::$entityList->getEntityFromType($type);
|
||||
if($efl instanceof PropertyEntity){
|
||||
console(json_encode($data));
|
||||
$class = $efl->getEntityName();
|
||||
console("yey");
|
||||
$this->entities[$eid] = new $class($level, $eid, $efl->getEntityClass(), $efl->getEntityType(), $data);
|
||||
}else{
|
||||
$this->entities[$eid] = new Entity($level, $eid, $class, $type, $data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue