mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
#854: Move getHighestBlockYAt methods from World to RegionAccessor
By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
parent
093f7027d3
commit
1ca237423e
2 changed files with 45 additions and 45 deletions
|
@ -348,4 +348,49 @@ public interface RegionAccessor {
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<T> function) throws IllegalArgumentException;
|
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<T> function) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the highest non-empty (impassable) coordinate at the given
|
||||||
|
* coordinates.
|
||||||
|
*
|
||||||
|
* @param x X-coordinate of the blocks
|
||||||
|
* @param z Z-coordinate of the blocks
|
||||||
|
* @return Y-coordinate of the highest non-empty block
|
||||||
|
*/
|
||||||
|
public int getHighestBlockYAt(int x, int z);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the highest non-empty (impassable) coordinate at the given
|
||||||
|
* {@link Location}.
|
||||||
|
*
|
||||||
|
* @param location Location of the blocks
|
||||||
|
* @return Y-coordinate of the highest non-empty block
|
||||||
|
*/
|
||||||
|
public int getHighestBlockYAt(@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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,25 +65,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||||
@NotNull
|
@NotNull
|
||||||
public Block getBlockAt(@NotNull Location location);
|
public Block getBlockAt(@NotNull Location location);
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the highest non-empty (impassable) coordinate at the given
|
|
||||||
* coordinates.
|
|
||||||
*
|
|
||||||
* @param x X-coordinate of the blocks
|
|
||||||
* @param z Z-coordinate of the blocks
|
|
||||||
* @return Y-coordinate of the highest non-empty block
|
|
||||||
*/
|
|
||||||
public int getHighestBlockYAt(int x, int z);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the highest non-empty (impassable) coordinate at the given
|
|
||||||
* {@link Location}.
|
|
||||||
*
|
|
||||||
* @param location Location of the blocks
|
|
||||||
* @return Y-coordinate of the highest non-empty block
|
|
||||||
*/
|
|
||||||
public int getHighestBlockYAt(@NotNull Location location);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the highest non-empty (impassable) block at the given coordinates.
|
* Gets the highest non-empty (impassable) block at the given coordinates.
|
||||||
*
|
*
|
||||||
|
@ -103,32 +84,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||||
@NotNull
|
@NotNull
|
||||||
public Block getHighestBlockAt(@NotNull Location location);
|
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
|
* Gets the highest block corresponding to the {@link HeightMap} at the
|
||||||
* given coordinates.
|
* given coordinates.
|
||||||
|
|
Loading…
Reference in a new issue