mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Add getComputedBiome API
This commit is contained in:
parent
b0e4de9c20
commit
ffdfd64ea5
2 changed files with 36 additions and 0 deletions
|
@ -25,6 +25,7 @@ public interface RegionAccessor extends Keyed { // Paper
|
||||||
*
|
*
|
||||||
* @param location the location of the biome
|
* @param location the location of the biome
|
||||||
* @return Biome at the given location
|
* @return Biome at the given location
|
||||||
|
* @see #getComputedBiome(int, int, int)
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Biome getBiome(@NotNull Location location);
|
Biome getBiome(@NotNull Location location);
|
||||||
|
@ -36,10 +37,33 @@ public interface RegionAccessor extends Keyed { // Paper
|
||||||
* @param y Y-coordinate of the block
|
* @param y Y-coordinate of the block
|
||||||
* @param z Z-coordinate of the block
|
* @param z Z-coordinate of the block
|
||||||
* @return Biome at the given coordinates
|
* @return Biome at the given coordinates
|
||||||
|
* @see #getComputedBiome(int, int, int)
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Biome getBiome(int x, int y, int z);
|
Biome getBiome(int x, int y, int z);
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
/**
|
||||||
|
* Gets the computed {@link Biome} at the given coordinates.
|
||||||
|
*
|
||||||
|
* <p>The computed Biome is the Biome as seen by clients for rendering
|
||||||
|
* purposes and in the "F3" debug menu. This is computed by looking at the noise biome
|
||||||
|
* at this and surrounding quarts and applying complex math operations.</p>
|
||||||
|
*
|
||||||
|
* <p>Most other Biome-related methods named getBiome, setBiome, and similar
|
||||||
|
* operate on the "noise biome", which is stored per-quart, or in other words,
|
||||||
|
* 1 Biome per 4x4x4 block region. This is how Biomes are currently generated and
|
||||||
|
* stored on disk.</p>
|
||||||
|
*
|
||||||
|
* @param x X-coordinate of the block
|
||||||
|
* @param y Y-coordinate of the block
|
||||||
|
* @param z Z-coordinate of the block
|
||||||
|
* @return Biome at the given coordinates
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
Biome getComputedBiome(int x, int y, int z);
|
||||||
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link Biome} at the given {@link Location}.
|
* Sets the {@link Biome} at the given {@link Location}.
|
||||||
*
|
*
|
||||||
|
|
|
@ -375,10 +375,22 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
* Returns the biome that this block resides in
|
* Returns the biome that this block resides in
|
||||||
*
|
*
|
||||||
* @return Biome type containing this block
|
* @return Biome type containing this block
|
||||||
|
* @see #getComputedBiome()
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Biome getBiome();
|
Biome getBiome();
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
/**
|
||||||
|
* Gets the computed biome at the location of this Block.
|
||||||
|
*
|
||||||
|
* @return computed biome at the location of this Block.
|
||||||
|
* @see org.bukkit.RegionAccessor#getComputedBiome(int, int, int)
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
Biome getComputedBiome();
|
||||||
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the biome that this block resides in
|
* Sets the biome that this block resides in
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue