Java Code Examples for net.minecraft.world.World#getWorldChunkManager()

The following examples show how to use net.minecraft.world.World#getWorldChunkManager() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MoCTools.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public static BiomeGenBase whatBiome(World world, int i, int j, int k)
{
    WorldChunkManager worldchunkmanager = world.getWorldChunkManager();
    if (worldchunkmanager == null) { return null; }
    //TODO works?
    //BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAt(i >> 4, k >> 4);
    BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAt(i, k);
    //BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAtChunkCoord(new ChunkCoordIntPair(i >> 4, k >> 4));
    if (biomegenbase == null)
    {
        return null;
    }
    else
    {
        return biomegenbase;
    }
}
 
Example 2
Source File: MoCTools.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public static String BiomeName(World world, int i, int j, int k)
{
    WorldChunkManager worldchunkmanager = world.getWorldChunkManager();
    if (worldchunkmanager == null) { return null; }
    //BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAt(i >> 4, k >> 4);
    BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAt(i, k);
    //TODO works?

    if (biomegenbase == null)
    {
        return null;
    }
    else
    {
        return biomegenbase.biomeName;
    }
}
 
Example 3
Source File: MoCTools.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
public static BiomeGenBase Biomekind(World world, int i, int j, int k)
{
    WorldChunkManager worldchunkmanager = world.getWorldChunkManager();
    if (worldchunkmanager == null) { return null; }
    BiomeGenBase biomegenbase = worldchunkmanager.getBiomeGenAt(i, k);
    if (biomegenbase == null)
    {
        return null;
    }
    else
    {
        return biomegenbase;
    }
}