How would I do the following

Discussion in 'Plugin Development' started by sfxworks, Jul 17, 2012.

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

    sfxworks

    Detect cliffs (overhangs exct)
    Fill in the air under them with gravel (or some other useless block)
     
  2. Offline

    travja

    I would just use worldedit....
     
  3. if the (sky) light level is lower then 15, then there must be an block somewhere above
     
    r0306 likes this.
  4. Offline

    sfxworks

  5. if the light level is smaller that 15, but bigger than 0, fill it up
     
  6. Offline

    pzxc

    Code:
    boolean foundBlock = false;
    for (int y=255; y>=0; y--) {
        Location loc = new Location(getServer().getWorld("world"), 0, y, 0);
        if (foundBlock && loc.getType() == Material.AIR) loc.setType(Material.GRAVEL);
        if (loc.getType() != Material.AIR) foundBlock = true;
    }
     
  7. Offline

    EnvisionRed

    which would also affect caves with lava
     
  8. Offline

    Derthmonuter

    If the light level is smaller than 15, bigger than 0, and above a certain altitude.
     
  9. Offline

    chaseoes

    Caves can be at any level.
     
  10. Offline

    Derthmonuter

    But lava lakes aren't.
     
  11. EnvisionRed
    I was meaning the sky light level, but I forgot to type sky
     
  12. Offline

    Njol

    How do you intend to distinguish cliffs from cave entrances?
     
  13. Offline

    chaseoes

    You've never seen a surface lava lake?
     
  14. Offline

    Derthmonuter

    I have, but if you payed attention, those would not get covered up. They fail the check for altitude, and so will not be covered. Now would you kindly either offer some ideas for the OP, or gtfo this thread.
     
  15. Offline

    chaseoes

    And why would they not be covered up? Again, they can occour at any level, so the altitude check is irrelevant.
     
  16. Offline

    Njol

    I have never seen a lava lake on a mountain, only about sea level, though they might simply be rare. I have to support the height check though as cliffs do not exist below sea level (except for crevices if you count those as well) and checking blocks below would simply be a waste of ressources.
     
  17. Offline

    Derthmonuter

    You have to think of the likely-hood of that. It's not possible to spare each and every single lava lake without doing way too many checks. And they would not get covered up if they are on the surface, as the light level is above zero. Honestly, you don't understand the problem here, and you aren't trying to offer ANY solution whatsoever.
     
  18. Offline

    chaseoes

    I don't have to provide any kind of a solution whatsoever. I'm simply saying it won't work 100% of the time.
     
  19. Offline

    sfxworks

    Well I guess ill have to have the world rendered without the cool overhangs -_-
     
  20. Offline

    Njol

    Why do you want 'cool overhangs' filled with a useless block underneath? :eek:
     
    ferrybig likes this.
  21. Offline

    sfxworks

    So I can get rid of the useless blocks after the bo2's successfully rendered
     
  22. Offline

    Njol

    So you want to prevent any bo2s from being placed under cliffs? Or is your terrain generator not properly checking whether there's enough space for the bo2s it's placing, possibly overriding cliffs?
     
Thread Status:
Not open for further replies.

Share This Page