@@ -18,7 +18,7 @@ Y range: [0, 1023]
18
18
X, Z range: [-67 108 864, 67 108 863]
19
19
20
20
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
21
- index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..58728a0f0722b378efa129e26f0c822b63d1af36 100644
21
+ index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..5c5e05673e0912f4dbd6c728f4c3b7fcdae8f0e8 100644
22
22
--- a/src/main/java/org/bukkit/Location.java
23
23
+++ b/src/main/java/org/bukkit/Location.java
24
24
@@ -15,7 +15,6 @@ import org.jetbrains.annotations.Nullable;
@@ -29,7 +29,7 @@ index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..58728a0f0722b378efa129e26f0c822b
29
29
import java.util.function.Predicate;
30
30
import org.bukkit.entity.Entity;
31
31
import org.bukkit.entity.LivingEntity;
32
- @@ -605,6 +604,17 @@ public class Location implements Cloneable, ConfigurationSerializable {
32
+ @@ -605,6 +604,19 @@ public class Location implements Cloneable, ConfigurationSerializable {
33
33
blockLoc.setZ(getBlockZ());
34
34
return blockLoc;
35
35
}
@@ -38,7 +38,9 @@ index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..58728a0f0722b378efa129e26f0c822b
38
38
+ /**
39
39
+ * @return The block key for this location's block location.
40
40
+ * @see Block#getBlockKey(int, int, int)
41
+ + * @deprecated only encodes y block ranges from -512 to 511 and represents an already changed implementation detail
41
42
+ */
43
+ + @Deprecated
42
44
+ public long toBlockKey() {
43
45
+ return Block.getBlockKey(getBlockX(), getBlockY(), getBlockZ());
44
46
+ }
@@ -48,10 +50,10 @@ index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..58728a0f0722b378efa129e26f0c822b
48
50
* @return A new location where X/Y/Z are the center of the block
49
51
*/
50
52
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
51
- index ee277a464b1ecaaa7948c333a04e347e6255c904..7d77647dfe085cde87a9d2adb4c02b1f441940d7 100644
53
+ index a501384906fa01ddc83476ef2dbbb8d11a03fb8c..449d6882c8f41d9e0f46436c430e071b85eb2775 100644
52
54
--- a/src/main/java/org/bukkit/World.java
53
55
+++ b/src/main/java/org/bukkit/World.java
54
- @@ -92,6 +92,38 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
56
+ @@ -92,6 +92,40 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
55
57
@NotNull
56
58
public Block getBlockAt(@NotNull Location location);
57
59
@@ -62,8 +64,10 @@ index ee277a464b1ecaaa7948c333a04e347e6255c904..7d77647dfe085cde87a9d2adb4c02b1f
62
64
+ * @param key The block key. See {@link Block#getBlockKey()}
63
65
+ * @return Block at the key
64
66
+ * @see Block#getBlockKey(int, int, int)
67
+ + * @deprecated only encodes y block ranges from -512 to 511 and represents an already changed implementation detail
65
68
+ */
66
69
+ @NotNull
70
+ + @Deprecated
67
71
+ public default Block getBlockAtKey(long key) {
68
72
+ int x = Block.getBlockKeyX(key);
69
73
+ int y = Block.getBlockKeyY(key);
0 commit comments