Making Zombies Spawn During The Day

Discussion in 'Plugin Development' started by Bench3, Oct 28, 2012.

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

    Bench3

    Hey guys, I was wondering how I would make it so that zombies spawn during the day?

    Thanks,
    ~Ben
     
  2. Offline

    mathiasrocker

    Should try help you
     
  3. Offline

    CarPet

    Wow Ben I look up to you and you are on here :/ Followed your tuts XD and I know how to do this, thank you for teaching me the basics!
     
  4. Offline

    CarPet

    Just run a scheduler and set all zombie fire ticks to 0
     
  5. Offline

    skipperguy12

    Or spawn them with a fire resistance potion or set their helmet to pumpkin! :D

    Pumpkin Zombies 4TW
     
  6. Offline

    TeeePeee

    Or just catch an EntitySpawnEvent and if it's an animal, cancel the event and spawn a zombie at that or a new location.

    To get them to not burn add this code:
    Code:
    @EventHandler
    private void onCombust(EntityCombustEvent event) {
        event.setCancelled(true);
    }
    to simply cancel the event.
     
  7. Offline

    skipperguy12

    Or better yet:
    Code:
    @EventHandler
    private void onCombust(EntityCombustEvent event) {
        if(event.getEntityType() == EntityType.ZOMBIE){
     event.setCancelled(true);
    }
       
    }
     
  8. Offline

    Malikk

    Judging by the exact way he phrased that question, I think he was wanting to know how to make it so that zombies naturally spawn during the daytime, not how to stop a manually spawned one from catching fire.

    I've never done this, but I imagine you'd have to override the nms Zombie class and change the variable which effects the light level it can spawn in.
     
  9. Offline

    gomeow

    Bench3
    I have seen some of your videos and my biggest pet peev is that you do unnecessary stuff. I would scratch your current onEnable and onDisable methods. Bukkit already prints out an enabled and disabled message.
     
Thread Status:
Not open for further replies.

Share This Page