Getting the Biome of a certain Location

Discussion in 'Plugin Development' started by Kierrow, Jan 13, 2012.

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

    Kierrow

    Hi there,

    I'm currently developing a Biomes plugin, and I've come across a problem I
    had not expected at all:
    I want to create a temp world (just a work-around) and then, after it generated,
    get the Biome of specific locations.
    The only problem is, after a few Biome calls, the <World>.getBiome(int x, int z) returns null.
    Why is that, how is it possible and how can I change that?

    Also, if you happen to know how I can get the Biome by seed and location without generating an
    entire world, please tell me, because that would be a lot easier.

    Thanks in advance,
    Kierrow
     
  2. Mayby:
    Location loc;
    Biome b = loc.getBlock().getBiome();
     
  3. Offline

    Zacherl

    Take a look at the AMIDST Project. That tool generates a biome map from a given seed.
     
    fromgate likes this.
  4. Interesting. loc.getBlock().getBiome() is a option. Could you give us the NPE?
     
  5. Offline

    Zacherl

    I found that on jenkins:
    "Fixed block.getBiome returning null in new 1.1 biomes. This fixes BUKKIT-496" - Build 1726

    Maybe updating to that build will fix your problem.
     
    nunber1_Master and Kierrow like this.
  6. Offline

    Kierrow

    Thanks! Appearently MC 1.1 has different Biomes now, I got the latest build and it's working now.
     
Thread Status:
Not open for further replies.

Share This Page