Mob Spawn

WindSkull

Member
Last edited:

CreeperFace

🇨🇿🇺🇦 Слава Україні!
Staff member
args are varargs parameter which means you don't have to insert anything so just
PHP:
Entity.createEntity(43,new Location(0,0,0));
 

WindSkull

Member
Code:
 [ALERT] java.lang.RuntimeException: java.lang.NullPointerException
        at cn.nukkit.plugin.PluginManager.enablePlugin(PluginManager.java:439)
        at cn.nukkit.Server.enablePlugin(Server.java:668)
        at cn.nukkit.Server.enablePlugins(Server.java:657)
        at cn.nukkit.Server.<init>(Server.java:501)
        at cn.nukkit.Nukkit.main(Nukkit.java:102)
Caused by: java.lang.NullPointerException
        at cn.nukkit.entity.Entity.createEntity(Entity.java:654)
Entity mobo = Entity.createEntity(43,new Location(0,0,0));

Nope, still null;
 

WindSkull

Member
Ok, i have mob but he do not have AI, how add AI to him?
Code:
Entity ent = ( Entity ) this.Enitiy.clone();
ent.setPosition(location.add(0,2,0));
ent.setLevel(World);
ent.spawnToAll();
 

CreeperFace

🇨🇿🇺🇦 Слава Україні!
Staff member
there is not AI implemented in nukkit, you should use mob plugin for example
 
Top