mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
added some new mobs
This commit is contained in:
parent
5fdf1f6b75
commit
d5d634b6fb
9 changed files with 111 additions and 1 deletions
16
src/entity/monster/Enderman.php
Normal file
16
src/entity/monster/Enderman.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
class Enderman extends Monster
|
||||
{
|
||||
const TYPE = MOB_ENDERMAN;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.6, 2.9);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setName("Enderman");
|
||||
$this->setSpeed(0.3);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 40, "generic");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
14
src/entity/monster/SilverFish.php
Normal file
14
src/entity/monster/SilverFish.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
class SilverFish extends Monster
|
||||
{
|
||||
const TYPE = MOB_SILVERFISH;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.3, 0.7);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setSpeed(0.3);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
||||
$this->setName("Silverfish");
|
||||
}
|
||||
}
|
||||
|
||||
15
src/entity/monster/Slime.php
Normal file
15
src/entity/monster/Slime.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
class Slime extends Monster
|
||||
{
|
||||
const TYPE = MOB_SLIME;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setName("Slime");
|
||||
/* Health formula
|
||||
* SlimeSize = Slime::getSlimeSize(this);
|
||||
* return SlimeSize * SlimeSize;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue