Zombies spawning in the day.

Discussion in 'Plugin Development' started by Deckerz, Feb 22, 2013.

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

    Deckerz

    Hey,

    The title says it all :p

    many thanks,
    deckerz
     
  2. Offline

    MinerPiggeh

    If they spawn in day there on fire. I dont know if that is a problem?
     
  3. Offline

    Deckerz

    yes but ive already stopped that i just need to know how to make them spawn the day.
     
  4. Offline

    Frazz86

    To do this, im pretty certain you'd have to extend the current spawning file and rewrite it; not sure its possible within the bukkit api
     
  5. Offline

    MinerPiggeh

    I dont know if it blocks a sheep from spawning but it spawns a zombie at day.
    Code:
        public void onCreatureSpawn(CreatureSpawnEvent e){
            if(e.getEntity() instanceof Sheep){
                e.getLocation().getWorld().spawnEntity(e.getLocation() , org.bukkit.entity.EntityType.ZOMBIE);
            }
    }
    If it blocks sheeps from spawning just add
    Code:
    e.getLocation().getWorld().spawnEntity(e.getLocation() , org.bukkit.entity.EntityType.SHEEP);
    I don't know if it works but you can try it :p.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  6. Offline

    Frazz86

    Sheep don't spawn :p. They only spawn once when the world is generated and from there they are persistant.
     
  7. Offline

    MinerPiggeh

    Frazz86 Oops so that doenst work maybe another entity?
     
  8. Offline

    Frazz86

    No entity really follows his specification MinerPiggeh. All animals are persistant when spawning and monsters only spawn in darkness unless they're a nether mob; he'd have to edit the custom data.
     
  9. Offline

    Deckerz

    could you just make it permanent night, and use protocol Lib to make it look like day?
     
  10. Offline

    Frazz86

    Well you can, but then monsters will be spawning and users will get confused because to them it will look like day time...
     
  11. Offline

    Deckerz

    That's doesn't matter in recreating DayZ
     
Thread Status:
Not open for further replies.

Share This Page