#473: Add an API for passing the heightmap to getHighestBlockAt* method

By: ysl3000 <yannicklamprecht@live.de>
This commit is contained in:
Bukkit/Spigot
2020-02-09 10:31:05 +11:00
parent 26409057b9
commit 92cb9d0c47
2 changed files with 87 additions and 0 deletions

View File

@@ -97,6 +97,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull
public Block getHighestBlockAt(@NotNull Location location);
/**
* Gets the highest coordinate corresponding to the {@link HeightMap} at the
* given coordinates.
*
* @param x X-coordinate of the blocks
* @param z Z-coordinate of the blocks
* @param heightMap the heightMap that is used to determine the highest
* point
*
* @return Y-coordinate of the highest block corresponding to the
* {@link HeightMap}
*/
public int getHighestBlockYAt(int x, int z, @NotNull HeightMap heightMap);
/**
* Gets the highest coordinate corresponding to the {@link HeightMap} at the
* given {@link Location}.
*
* @param location Location of the blocks
* @param heightMap the heightMap that is used to determine the highest
* point
* @return Y-coordinate of the highest block corresponding to the
* {@link HeightMap}
*/
public int getHighestBlockYAt(@NotNull Location location, @NotNull HeightMap heightMap);
/**
* Gets the highest block corresponding to the {@link HeightMap} at the
* given coordinates.
*
* @param x X-coordinate of the block
* @param z Z-coordinate of the block
* @param heightMap the heightMap that is used to determine the highest
* point
* @return Highest block corresponding to the {@link HeightMap}
*/
@NotNull
public Block getHighestBlockAt(int x, int z, @NotNull HeightMap heightMap);
/**
* Gets the highest block corresponding to the {@link HeightMap} at the
* given coordinates.
*
* @param location Coordinates to get the highest block
* @param heightMap the heightMap that is used to determine the highest
* point
* @return Highest block corresponding to the {@link HeightMap}
*/
@NotNull
public Block getHighestBlockAt(@NotNull Location location, @NotNull HeightMap heightMap);
/**
* Gets the {@link Chunk} at the given coordinates
*