Get Entity From EntityType

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

  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. Offline

    DerDonut

    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
     

Share This Page