mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Use ? super in Consumer/Predicate API (#9939)
This commit is contained in:
@@ -10,14 +10,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -0,0 +0,0 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
|
||||
public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
||||
|
||||
// Paper start
|
||||
+ // Paper start - expand location manipulation API
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the position of this Location and returns itself
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This mutates this object, clone first.
|
||||
+ *
|
||||
+ * @param x X coordinate
|
||||
+ * @param y Y coordinate
|
||||
+ * @param z Z coordinate
|
||||
@@ -33,8 +35,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ /**
|
||||
+ * Takes the x/y/z from base and adds the specified x/y/z to it and returns self
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This mutates this object, clone first.
|
||||
+ *
|
||||
+ * @param base The base coordinate to modify
|
||||
+ * @param x X coordinate to add to base
|
||||
+ * @param y Y coordinate to add to base
|
||||
@@ -48,8 +51,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ /**
|
||||
+ * Takes the x/y/z from base and subtracts the specified x/y/z to it and returns self
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This mutates this object, clone first.
|
||||
+ *
|
||||
+ * @param base The base coordinate to modify
|
||||
+ * @param x X coordinate to subtract from base
|
||||
+ * @param y Y coordinate to subtract from base
|
||||
@@ -60,7 +64,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public Location subtract(@NotNull Location base, double x, double y, double z) {
|
||||
+ return this.set(base.x - x, base.y - y, base.z - z);
|
||||
+ }
|
||||
+ // Paper end - expand location manipulation API
|
||||
+
|
||||
// Paper start - expand Location API
|
||||
/**
|
||||
* @return A new location where X/Y/Z are on the Block location (integer value of X/Y/Z)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user