mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Unnecessary ":?" (2)
This commit is contained in:
parent
0f26e45638
commit
69385e16f2
21 changed files with 36 additions and 48 deletions
|
|
@ -7,7 +7,7 @@ class Creeper extends Monster{
|
|||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.6, 1.7);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 16, "generic");
|
||||
$this->setHealth($this->data["Health"] ?? 16, "generic");
|
||||
$this->setName("Creeper");
|
||||
$this->ignited = 0;
|
||||
$this->setSpeed(0.25);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class PigZombie extends Monster{ //TODO extends zombie
|
|||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.3, 1.95);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
|
||||
$this->setHealth($this->data["Health"] ?? 12, "generic");
|
||||
$this->setName("Pigman");
|
||||
$this->setSpeed(0.25);
|
||||
$this->isImmuneToFire = true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class Skeleton extends Monster{
|
|||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.6, 1.99);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 10, "generic");
|
||||
$this->setHealth($this->data["Health"] ?? 10, "generic");
|
||||
$this->setName("Skeleton");
|
||||
$this->ai->removeTask("TaskAttackPlayer");
|
||||
$this->setSpeed(0.25);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class Spider extends Monster{
|
|||
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
$this->setSize(1.4, 0.9);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
||||
$this->setHealth($this->data["Health"] ?? 8, "generic");
|
||||
$this->setName("Spider");
|
||||
$this->setSpeed(0.3);
|
||||
$this->ai->addTask(new TaskRandomWalk(1.2));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class Zombie extends Monster{
|
|||
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
$this->setSize(0.6, 1.85);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
|
||||
$this->setHealth($this->data["Health"] ?? 12, "generic");
|
||||
$this->setName("Zombie");
|
||||
$this->setSpeed(0.23);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue