Class BiomeVariationMapLayer
java.lang.Object
net.glowstone.generator.biomegrid.MapLayer
net.glowstone.generator.biomegrid.BiomeVariationMapLayer
-
Constructor Summary
ConstructorDescriptionBiomeVariationMapLayer
(long seed, MapLayer belowLayer) Creates an instance with no variation layer.BiomeVariationMapLayer
(long seed, MapLayer belowLayer, MapLayer variationLayer) Creates an instance with the given variation layer. -
Method Summary
Modifier and TypeMethodDescriptionint[]
generateRandomValues
(int x, int z, int sizeX, int sizeZ) Generates a rectangle, replacing all the positive values in the previous layer with random values from 2 to 31 while leaving zero and negative values unchanged.int[]
generateValues
(int x, int z, int sizeX, int sizeZ) int[]
mergeValues
(int x, int z, int sizeX, int sizeZ) Generates a rectangle using the previous layer and the variation layer.Methods inherited from class net.glowstone.generator.biomegrid.MapLayer
initialize, nextInt, setCoordsSeed
-
Constructor Details
-
BiomeVariationMapLayer
Creates an instance with no variation layer.- Parameters:
seed
- the PRNG seedbelowLayer
- the layer below this one
-
BiomeVariationMapLayer
Creates an instance with the given variation layer.- Parameters:
seed
- the PRNG seedbelowLayer
- the layer below this onevariationLayer
- the variation layer, or null to use no variation layer
-
-
Method Details
-
generateValues
public int[] generateValues(int x, int z, int sizeX, int sizeZ) - Specified by:
generateValues
in classMapLayer
-
generateRandomValues
public int[] generateRandomValues(int x, int z, int sizeX, int sizeZ) Generates a rectangle, replacing all the positive values in the previous layer with random values from 2 to 31 while leaving zero and negative values unchanged.- Parameters:
x
- the lowest x coordinatez
- the lowest z coordinatesizeX
- the x coordinate rangesizeZ
- the z coordinate range- Returns:
- a flattened array of generated values
-
mergeValues
public int[] mergeValues(int x, int z, int sizeX, int sizeZ) Generates a rectangle using the previous layer and the variation layer.- Parameters:
x
- the lowest x coordinatez
- the lowest z coordinatesizeX
- the x coordinate rangesizeZ
- the z coordinate range- Returns:
- a flattened array of generated values
-