public abstract class BiomeGrid extends Object
Constructor and Description |
---|
BiomeGrid(org.bukkit.World w,
double freq1,
double freq2,
int sizeX,
int sizeZ) |
Modifier and Type | Method and Description |
---|---|
Biome |
getBiome(int x,
int z,
GenerationPhase phase)
Gets the biome at a pair of coordinates.
|
Biome |
getBiome(org.bukkit.Location l)
Gets the biome at a location.
|
Biome |
getBiome(org.bukkit.Location l,
GenerationPhase phase) |
int |
getBiomeNoiseX(int x,
int z)
Get the raw X-noise for coordinates in the Grid.
|
int |
getBiomeNoiseZ(int x,
int z)
Get the raw Z-noise for coordinates in the Grid.
|
Biome[][] |
getGrid() |
double[] |
getRawNoise(int x,
int z) |
int |
getSizeX() |
int |
getSizeZ() |
org.bukkit.World |
getWorld() |
protected int |
normalize(double i,
int range)
Takes a noise input and normalizes it to a value between 0 and 15 inclusive.
|
void |
setGrid(Biome[][] grid) |
public BiomeGrid(org.bukkit.World w, double freq1, double freq2, int sizeX, int sizeZ)
public Biome getBiome(int x, int z, GenerationPhase phase)
x
- - X-coordinate at which to fetch biomez
- - Z-coordinate at which to fetch biomepublic Biome getBiome(org.bukkit.Location l)
l
- - The location at which to fetch the biome.public double[] getRawNoise(int x, int z)
public int getBiomeNoiseX(int x, int z)
x
- X coordinatez
- Z coordinatepublic int getBiomeNoiseZ(int x, int z)
x
- X coordinatez
- Z coordinatepublic Biome[][] getGrid()
public void setGrid(Biome[][] grid)
public Biome getBiome(org.bukkit.Location l, GenerationPhase phase)
public org.bukkit.World getWorld()
public int getSizeX()
public int getSizeZ()
protected int normalize(double i, int range)
i
- - The noise value to normalize.Copyright © 2020. All rights reserved.