mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
#795: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
By: FreeSoccerHDX <freesoccerhdx@gmail.com>
This commit is contained in:
parent
eb1da343c8
commit
cd28159b45
2 changed files with 170 additions and 0 deletions
|
@ -0,0 +1,140 @@
|
|||
package org.bukkit.generator;
|
||||
|
||||
/**
|
||||
* Represents the biome noise parameters which may be passed to a world
|
||||
* generator.
|
||||
*/
|
||||
public interface BiomeParameterPoint {
|
||||
|
||||
/**
|
||||
* Gets the temperature of the biome at this point that is suggested by the
|
||||
* NoiseGenerator.
|
||||
*
|
||||
* @return The temperature of the biome at this point
|
||||
*/
|
||||
double getTemperature();
|
||||
|
||||
/**
|
||||
* Gets the maximum temperature that is possible.
|
||||
*
|
||||
* @return The maximum temperature
|
||||
*/
|
||||
double getMaxTemperature();
|
||||
|
||||
/**
|
||||
* Gets the minimum temperature that is possible.
|
||||
*
|
||||
* @return The minimum temperature
|
||||
*/
|
||||
double getMinTemperature();
|
||||
|
||||
/**
|
||||
* Gets the humidity of the biome at this point that is suggested by the
|
||||
* NoiseGenerator.
|
||||
*
|
||||
* @return The humidity of the biome at this point
|
||||
*/
|
||||
double getHumidity();
|
||||
|
||||
/**
|
||||
* Gets the maximum humidity that is possible.
|
||||
*
|
||||
* @return The maximum humidity
|
||||
*/
|
||||
double getMaxHumidity();
|
||||
|
||||
/**
|
||||
* Gets the minimum humidity that is possible.
|
||||
*
|
||||
* @return The minimum humidity
|
||||
*/
|
||||
double getMinHumidity();
|
||||
|
||||
/**
|
||||
* Gets the continentalness of the biome at this point that is suggested by
|
||||
* the NoiseGenerator.
|
||||
*
|
||||
* @return The continentalness of the biome at this point
|
||||
*/
|
||||
double getContinentalness();
|
||||
|
||||
/**
|
||||
* Gets the maximum continentalness that is possible.
|
||||
*
|
||||
* @return The maximum continentalness
|
||||
*/
|
||||
double getMaxContinentalness();
|
||||
|
||||
/**
|
||||
* Gets the minimum continentalness that is possible.
|
||||
*
|
||||
* @return The minimum continentalness
|
||||
*/
|
||||
double getMinContinentalness();
|
||||
|
||||
/**
|
||||
* Gets the erosion of the biome at this point that is suggested by the
|
||||
* NoiseGenerator.
|
||||
*
|
||||
* @return The erosion of the biome at this point
|
||||
*/
|
||||
double getErosion();
|
||||
|
||||
/**
|
||||
* Gets the maximum erosion that is possible.
|
||||
*
|
||||
* @return The maximum erosion
|
||||
*/
|
||||
double getMaxErosion();
|
||||
|
||||
/**
|
||||
* Gets the minimum erosion that is possible.
|
||||
*
|
||||
* @return The minimum erosion
|
||||
*/
|
||||
double getMinErosion();
|
||||
|
||||
/**
|
||||
* Gets the depth of the biome at this point that is suggested by the
|
||||
* NoiseGenerator.
|
||||
*
|
||||
* @return The depth of the biome at this point
|
||||
*/
|
||||
double getDepth();
|
||||
|
||||
/**
|
||||
* Gets the maximum depth that is possible.
|
||||
*
|
||||
* @return The maximum depth
|
||||
*/
|
||||
double getMaxDepth();
|
||||
|
||||
/**
|
||||
* Gets the minimum depth that is possible.
|
||||
*
|
||||
* @return The minimum depth
|
||||
*/
|
||||
double getMinDepth();
|
||||
|
||||
/**
|
||||
* Gets the weirdness of the biome at this point that is suggested by the
|
||||
* NoiseGenerator.
|
||||
*
|
||||
* @return The weirdness of the biome at this point
|
||||
*/
|
||||
double getWeirdness();
|
||||
|
||||
/**
|
||||
* Gets the maximum weirdness that is possible.
|
||||
*
|
||||
* @return The maximum weirdness
|
||||
*/
|
||||
double getMaxWeirdness();
|
||||
|
||||
/**
|
||||
* Gets the minimum weirdness that is possible.
|
||||
*
|
||||
* @return The minimum weirdness
|
||||
*/
|
||||
double getMinWeirdness();
|
||||
}
|
|
@ -31,6 +31,36 @@ public abstract class BiomeProvider {
|
|||
@NotNull
|
||||
public abstract Biome getBiome(@NotNull WorldInfo worldInfo, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Return the Biome which should be present at the provided location.
|
||||
* <p>
|
||||
* Notes:
|
||||
* <p>
|
||||
* This method <b>must</b> be completely thread safe and able to handle
|
||||
* multiple concurrent callers.
|
||||
* <p>
|
||||
* This method should only return biomes which are present in the list
|
||||
* returned by {@link #getBiomes(WorldInfo)}
|
||||
* <p>
|
||||
* This method should <b>never</b> return {@link Biome#CUSTOM}.
|
||||
* Only this method is called if both this and
|
||||
* {@link #getBiome(WorldInfo, int, int, int)} are overridden.
|
||||
*
|
||||
* @param worldInfo The world info of the world the biome will be used for
|
||||
* @param x The X-coordinate from world origin
|
||||
* @param y The Y-coordinate from world origin
|
||||
* @param z The Z-coordinate from world origin
|
||||
* @param biomeParameterPoint The parameter point that is provided by default
|
||||
* for this location (contains temperature, humidity,
|
||||
* continentalness, erosion, depth and weirdness)
|
||||
* @return Biome for the given location
|
||||
* @see #getBiome(WorldInfo, int, int, int)
|
||||
*/
|
||||
@NotNull
|
||||
public Biome getBiome(@NotNull WorldInfo worldInfo, int x, int y, int z, @NotNull BiomeParameterPoint biomeParameterPoint) {
|
||||
return getBiome(worldInfo, x, y, z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list with every biome the {@link BiomeProvider} will use for
|
||||
* the given world.
|
||||
|
|
Loading…
Reference in a new issue