Working with Biomes

Discussion in 'Plugin Development' started by Jeff.Halbert, Jan 9, 2013.

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

    Jeff.Halbert

    had a few questions about biomes.

    what i'm tryin to do:
    get all x and z coords for every block that is within the same biome location, so i can set a boarder between the current biome and neighboring biomes, then protect the biome location as a whole.
    for example:
    the current biome i am standing in is DESERT. the DESERT is surrounded by 3 other biomes, FOREST, TIAGA, and BEACH. i want to protect the desert only.

    questions:
    are biomes seperated by chunks? and if so, is there ever a case where a single chunk will have more than one biome?
    how can i get all the blocks(or chunks) in the same biome, even though the boarder would be a jagged?
     
  2. Offline

    fromgate

    Hello,

    1. Biomes are not separated by chunks. Any block (column) could store biome data. So if you need you can setup all biomes at single chunk :)

    2. To get all blocks related to defined biome you must... scan all area. You can use something like flood-fill algorithm but it very intensive, and I'm not sure that it's a good idea to use it.

    What you need to do? If you going to separate all at your world you can handle ChunkLoadEvent scan single chunk and build border.
     
  3. Offline

    Jeff.Halbert

    yeah, i was afraid that you would say that...lol.

    I plan on building an area protection plugin based on biome areas.

    Why would it be a bad idea?
     
Thread Status:
Not open for further replies.

Share This Page