how to spawn custom creature?

Discussion in 'Plugin Development' started by tabr, Jul 14, 2012.

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

    tabr

    there is a method:
    Code:
    player.getWorld().spawnEntity(player.getLocation(), EntityType.fromId(SOME_NUMBER));
    how can i get this number?
    to get it, i'll listen:
    Code:
    public void onEntityDeath(EntityDeathEvent event)
    {
    LivingEntity entity = event.getEntity();
    log.info("[CREATURE_DEATH]id:"+entity.getEntityId()+"/"+event.getEntityType().getName()+"/"+event.getEntityType().getTypeId()+"/");
    }
    
    there is mode logs:
    [CREATURE_DEATH]id:519678/Slime/55/
    [CREATURE_DEATH]id:553337/null/-1/
    [CREATURE_DEATH]id:586892/Skeleton/51/
    [CREATURE_DEATH]id:1079/Chicken/93/
    [CREATURE_DEATH]id:1077/Chicken/93/
    so, some mobs (from mod MOCreature) has'n EntityTypeId.
    How can i spawn this mobs?
    And how get some unique number to identify them?
     
  2. Offline

    Pandemoneus

    I'm pretty sure you can't spawn mobs from MOCreatures because that mod wasn't created to support Bukkit. As long as that is the case, you can't do it with the usual Bukkit methods (maybe with CraftBukkit or NMS).
     
Thread Status:
Not open for further replies.

Share This Page