Get Entity From EntityType

Discussion in 'Plugin Development' started by ericejs123, Dec 3, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    ericejs123

    Is there any way to get an Entity object from an EntityType? Example, if I have EntityType.ZOMBIE, how can I convert that into an Entity object to spawn into the world?
     
  2. I believe the syntax is
    Code:
    world.spawnEntity(location, entityType);
    This returns an instance of the spawned mob class which inherits from the class entity
    But if you only want to spawn the entity you just have to use the line from above
     
Thread Status:
Not open for further replies.

Share This Page