Added naturally spawn mobs in world

enabling in extra.properties on "experemental-mob-features"

code from mobtest3.2-test6
This commit is contained in:
ArkQuark 2022-12-14 21:17:26 +03:00
parent f2a4cf2337
commit a75b4cc4de
4 changed files with 125 additions and 0 deletions

View file

@ -17,6 +17,10 @@ class EntityAPI{
$this->server->api->console->register("summon", "<mob>", [$this, "commandHandler"]);
$this->server->api->console->register("spawnmob", "<mob>", [$this, "commandHandler"]);
$this->server->api->console->register("despawn", "", [$this, "CommandHandler"]);
if(($this->serverSpawnAnimals or $this->serverSpawnMobs) and Entity::$updateOnTick){
(new MobSpawner())->init();
}
}