mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-17 21:35:00 +00:00
Deprecate the StableAPI annotations, switch to JB annotations
This commit is contained in:
96 files changed
+1079
-762
No files matched your search
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
package com.falsepattern.lib.compat;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
@@ -37,17 +36,14 @@ import javax.annotation.concurrent.Immutable;
|
||||
@Immutable
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor
|
||||
@StableAPI(since = "0.6.0")
|
||||
public class ChunkPos {
|
||||
/**
|
||||
* The x position of the chunk.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public final int x;
|
||||
/**
|
||||
* The z position of the chunk.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public final int z;
|
||||
|
||||
/**
|
||||
@@ -55,7 +51,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @param blockPos the block pos
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public ChunkPos(@NonNull BlockPos blockPos) {
|
||||
x = blockPos.getX() >> 4;
|
||||
z = blockPos.getZ() >> 4;
|
||||
@@ -69,7 +64,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the unique chunk long
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static long asLong(int x, int z) {
|
||||
return (long) x & 0xFFFFFFFFL | ((long) z & 0xFFFFFFFFL) << 32;
|
||||
}
|
||||
@@ -81,7 +75,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the distance sq
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public double getDistanceSq(@NonNull Entity entity) {
|
||||
val dX = ((x << 4) + 8) - entity.posX;
|
||||
val dY = ((z << 4) + 8) - entity.posZ;
|
||||
@@ -93,7 +86,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the x start
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int getXStart() {
|
||||
return x << 4;
|
||||
}
|
||||
@@ -103,7 +95,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the z start
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int getZStart() {
|
||||
return z << 4;
|
||||
}
|
||||
@@ -113,7 +104,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the x end
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int getXEnd() {
|
||||
return (x << 4) + 15;
|
||||
}
|
||||
@@ -123,7 +113,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the z end
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int getZEnd() {
|
||||
return (z << 4) + 15;
|
||||
}
|
||||
@@ -137,7 +126,6 @@ public class ChunkPos {
|
||||
*
|
||||
* @return the relative block position
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public BlockPos getBlock(int x, int y, int z) {
|
||||
return new BlockPos((this.x << 4) + x, y, (this.z << 4) + z);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user