mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 13:42:25 -07:00
Schedule several things for removal in 1.21 (#9041)
This commit is contained in:
@@ -13,20 +13,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@
|
||||
+package com.destroystokyo.paper;
|
||||
+
|
||||
+import org.bukkit.*;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+/**
|
||||
+ * Enumeration of different heightmap types maintained by the server. Generally using these maps is much faster
|
||||
+ * than using an iterative search for a block in a given x, z coordinate.
|
||||
+ *
|
||||
+ * @deprecated Upstream has added their own API for using the game heightmaps. See {@link org.bukkit.HeightMap} and the
|
||||
+ * non-deprecated getHighestBlock methods on World such as {@link org.bukkit.World#getHighestBlockAt(Location, HeightMap)}.
|
||||
+ * non-deprecated getHighestBlock methods on World such as {@link org.bukkit.World#getHighestBlockAt(org.bukkit.Location, org.bukkit.HeightMap)}.
|
||||
+ */
|
||||
+@Deprecated
|
||||
+@Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+public enum HeightmapType {
|
||||
+
|
||||
+ /**
|
||||
+ * The highest block used for lighting in the world. Also the block returned by {@link World#getHighestBlockYAt(int, int)}}
|
||||
+ * The highest block used for lighting in the world. Also the block returned by {@link org.bukkit.World#getHighestBlockYAt(int, int)}}
|
||||
+ */
|
||||
+ LIGHT_BLOCKING,
|
||||
+
|
||||
@@ -79,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @deprecated Use {@link org.bukkit.Location#toHighestLocation(HeightMap)}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ public Location toHighestLocation(@NotNull final com.destroystokyo.paper.HeightmapType heightmap) {
|
||||
+ final Location ret = this.clone();
|
||||
+ ret.setY(this.getWorld().getHighestBlockYAt(this, heightmap));
|
||||
@@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @see com.destroystokyo.paper.HeightmapType
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ public int getHighestBlockYAt(int x, int z, @NotNull com.destroystokyo.paper.HeightmapType heightmap) throws UnsupportedOperationException;
|
||||
+
|
||||
+ /**
|
||||
@@ -145,7 +145,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @deprecated Upstream has added support for this, use {@link World#getHighestBlockYAt(Location, HeightMap)}
|
||||
+ * @see com.destroystokyo.paper.HeightmapType
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ default int getHighestBlockYAt(@NotNull Location location, @NotNull com.destroystokyo.paper.HeightmapType heightmap) throws UnsupportedOperationException {
|
||||
+ return this.getHighestBlockYAt(location.getBlockX(), location.getBlockZ(), heightmap);
|
||||
+ }
|
||||
@@ -164,7 +164,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @deprecated Upstream has added support for this, use {@link World#getHighestBlockAt(int, int, HeightMap)}
|
||||
+ * @see com.destroystokyo.paper.HeightmapType
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ @NotNull
|
||||
+ default Block getHighestBlockAt(int x, int z, @NotNull com.destroystokyo.paper.HeightmapType heightmap) throws UnsupportedOperationException {
|
||||
+ return this.getBlockAt(x, this.getHighestBlockYAt(x, z, heightmap), z);
|
||||
@@ -184,7 +184,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @deprecated Upstream has added support for this, use {@link World#getHighestBlockAt(Location, HeightMap)}
|
||||
+ * @see com.destroystokyo.paper.HeightmapType
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ @NotNull
|
||||
+ default Block getHighestBlockAt(@NotNull Location location, @NotNull com.destroystokyo.paper.HeightmapType heightmap) throws UnsupportedOperationException {
|
||||
+ return this.getHighestBlockAt(location.getBlockX(), location.getBlockZ(), heightmap);
|
||||
|
Reference in New Issue
Block a user