diff --git a/patches/api/Allow-Blocks-to-be-accessed-via-a-long-key.patch b/patches/api/Allow-Blocks-to-be-accessed-via-a-long-key.patch index aab2538abd..3c7ac0d7f2 100644 --- a/patches/api/Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/patches/api/Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -104,7 +104,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * Computed via: {@code Block.getBlockKey(this.getX(), this.getY(), this.getZ())} + * @see Block#getBlockKey(int, int, int) + * @return This block's x, y, and z coordinates packed into a long value ++ * @deprecated see {@link #getBlockKey(int, int, int)} + */ ++ @Deprecated + public default long getBlockKey() { + return Block.getBlockKey(this.getX(), this.getY(), this.getZ()); + } @@ -122,13 +124,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + *
+ * {@code int x = (int) ((packed << 37) >> 37);} + *
-+ * {@code int y = (int) (packed >>> 54);} ++ * {@code int y = (int) (packed >> 54);} + *
+ * {@code int z = (int) ((packed << 10) >> 37);} + *

+ * + * @return This block's x, y, and z coordinates packed into a long value ++ * @deprecated only encodes y block ranges from -512 to 511 and represents an already changed implementation detail + */ ++ @Deprecated + public static long getBlockKey(int x, int y, int z) { + return ((long)x & 0x7FFFFFF) | (((long)z & 0x7FFFFFF) << 27) | ((long)y << 54); + } @@ -138,7 +142,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param packed The packed value, as computed by {@link Block#getBlockKey(int, int, int)} + * @see Block#getBlockKey(int, int, int) + * @return The x component from the packed value. ++ * @deprecated see {@link #getBlockKey(int, int, int)} + */ ++ @Deprecated + public static int getBlockKeyX(long packed) { + return (int) ((packed << 37) >> 37); + } @@ -148,9 +154,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param packed The packed value, as computed by {@link Block#getBlockKey(int, int, int)} + * @see Block#getBlockKey(int, int, int) + * @return The y component from the packed value. ++ * @deprecated see {@link #getBlockKey(int, int, int)} + */ ++ @Deprecated + public static int getBlockKeyY(long packed) { -+ return (int) (packed >>> 54); ++ return (int) (packed >> 54); + } + + /** @@ -158,7 +166,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param packed The packed value, as computed by {@link Block#getBlockKey(int, int, int)} + * @see Block#getBlockKey(int, int, int) + * @return The z component from the packed value. ++ * @deprecated see {@link #getBlockKey(int, int, int)} + */ ++ @Deprecated + public static int getBlockKeyZ(long packed) { + return (int) ((packed << 10) >> 37); + }