diff --git a/src/main/java/com/falsepattern/lib/DeprecationDetails.java b/src/main/java/com/falsepattern/lib/DeprecationDetails.java index 119119f..9fb75a3 100644 --- a/src/main/java/com/falsepattern/lib/DeprecationDetails.java +++ b/src/main/java/com/falsepattern/lib/DeprecationDetails.java @@ -12,6 +12,5 @@ import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) @StableAPI(since = "0.10.0") public @interface DeprecationDetails { - @StableAPI.Expose - String deprecatedSince(); + @StableAPI.Expose String deprecatedSince(); } diff --git a/src/main/java/com/falsepattern/lib/StableAPI.java b/src/main/java/com/falsepattern/lib/StableAPI.java index d392e35..2ce4857 100644 --- a/src/main/java/com/falsepattern/lib/StableAPI.java +++ b/src/main/java/com/falsepattern/lib/StableAPI.java @@ -55,8 +55,7 @@ public @interface StableAPI { /** * The version this API was introduced/stabilized in. Used for library version tracking. */ - @StableAPI.Expose - String since(); + @StableAPI.Expose String since(); /** * You may use this annotation if you want a member to have an equal effective {@link #since()} value as its owner @@ -73,8 +72,7 @@ public @interface StableAPI { @Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) @StableAPI(since = "0.10.0") @interface Expose { - @StableAPI.Expose - String since() default "__PARENT__"; + @StableAPI.Expose String since() default "__PARENT__"; } /** @@ -87,5 +85,6 @@ public @interface StableAPI { @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) @StableAPI(since = "0.10.0") - @interface Internal {} + @interface Internal { + } } diff --git a/src/main/java/com/falsepattern/lib/compat/BlockPos.java b/src/main/java/com/falsepattern/lib/compat/BlockPos.java index aeb1742..3392b1b 100644 --- a/src/main/java/com/falsepattern/lib/compat/BlockPos.java +++ b/src/main/java/com/falsepattern/lib/compat/BlockPos.java @@ -105,9 +105,11 @@ public class BlockPos extends Vec3i { * In situations where it is usable, prefer * {@link #getAllInBoxMutable(BlockPos, BlockPos) instead as it has better performance (fewer allocations) *
+ * * @param from One corner of the box * @param to Another corner of the box - *
+ *
+ * * @see #getAllInBox(int, int, int, int, int, int) * @see #getAllInBoxMutable(BlockPos, BlockPos) */ @@ -125,13 +127,15 @@ public class BlockPos extends Vec3i { * In situations where it is usable, prefer * {@link #getAllInBoxMutable(BlockPos, BlockPos) instead as it has better performance (fewer allocations) *
+ * * @param x0 The lower x coordinate * @param y0 The lower y coordinate * @param z0 The lower z coordinate * @param x1 The upper x coordinate * @param y1 The upper y coordinate * @param z1 The upper z coordinate - *
+ *
+ *
* @see #getAllInBox(BlockPos, BlockPos)
* @see #getAllInBoxMutable(BlockPos, BlockPos)
*/
@@ -440,6 +444,7 @@ public class BlockPos extends Vec3i {
return super.rotate(rotation).toImmutable();
}
+ @Override
@StableAPI.Expose
public BlockPos toImmutable() {
return new BlockPos(this);
diff --git a/src/main/java/com/falsepattern/lib/compat/Rotation.java b/src/main/java/com/falsepattern/lib/compat/Rotation.java
index 9bff26b..1be4dd8 100644
--- a/src/main/java/com/falsepattern/lib/compat/Rotation.java
+++ b/src/main/java/com/falsepattern/lib/compat/Rotation.java
@@ -28,14 +28,10 @@ import net.minecraft.util.EnumFacing;
@StableAPI(since = "0.6.0")
public enum Rotation {
- @StableAPI.Expose
- NONE,
- @StableAPI.Expose
- CLOCKWISE_90,
- @StableAPI.Expose
- CLOCKWISE_180,
- @StableAPI.Expose
- COUNTERCLOCKWISE_90;
+ @StableAPI.Expose NONE,
+ @StableAPI.Expose CLOCKWISE_90,
+ @StableAPI.Expose CLOCKWISE_180,
+ @StableAPI.Expose COUNTERCLOCKWISE_90;
@StableAPI.Expose
public Rotation add(@NonNull Rotation rotation) {
diff --git a/src/main/java/com/falsepattern/lib/config/Config.java b/src/main/java/com/falsepattern/lib/config/Config.java
index b9f8607..7a5e2d6 100644
--- a/src/main/java/com/falsepattern/lib/config/Config.java
+++ b/src/main/java/com/falsepattern/lib/config/Config.java
@@ -44,14 +44,12 @@ public @interface Config {
/**
* The mod id that this configuration is associated with.
*/
- @StableAPI.Expose
- String modid();
+ @StableAPI.Expose String modid();
/**
* Root element category, defaults to "general". You must not specify an empty string.
*/
- @StableAPI.Expose
- String category() default "general";
+ @StableAPI.Expose String category() default "general";
/**
* The lang file key of this configuration. Used in config GUIs.
@@ -61,8 +59,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
@interface LangKey {
- @StableAPI.Expose
- String value();
+ @StableAPI.Expose String value();
}
/**
@@ -73,8 +70,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface Comment {
- @StableAPI.Expose
- String[] value();
+ @StableAPI.Expose String[] value();
}
/**
@@ -97,8 +93,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultBoolean {
- @StableAPI.Expose
- boolean value();
+ @StableAPI.Expose boolean value();
}
/**
@@ -109,10 +104,9 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface RangeInt {
- @StableAPI.Expose
- int min() default Integer.MIN_VALUE;
- @StableAPI.Expose
- int max() default Integer.MAX_VALUE;
+ @StableAPI.Expose int min() default Integer.MIN_VALUE;
+
+ @StableAPI.Expose int max() default Integer.MAX_VALUE;
}
/**
@@ -124,8 +118,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultInt {
- @StableAPI.Expose
- int value();
+ @StableAPI.Expose int value();
}
/**
@@ -139,10 +132,9 @@ public @interface Config {
@Target(ElementType.FIELD)
@StableAPI(since = "0.6.0")
@interface RangeFloat {
- @StableAPI.Expose
- float min() default -Float.MAX_VALUE;
- @StableAPI.Expose
- float max() default Float.MAX_VALUE;
+ @StableAPI.Expose float min() default -Float.MAX_VALUE;
+
+ @StableAPI.Expose float max() default Float.MAX_VALUE;
}
/**
@@ -157,8 +149,7 @@ public @interface Config {
@Target(ElementType.FIELD)
@StableAPI(since = "0.6.0")
@interface DefaultFloat {
- @StableAPI.Expose
- float value();
+ @StableAPI.Expose float value();
}
/**
@@ -169,10 +160,9 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface RangeDouble {
- @StableAPI.Expose
- double min() default -Double.MAX_VALUE;
- @StableAPI.Expose
- double max() default Double.MAX_VALUE;
+ @StableAPI.Expose double min() default -Double.MAX_VALUE;
+
+ @StableAPI.Expose double max() default Double.MAX_VALUE;
}
/**
@@ -184,8 +174,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultDouble {
- @StableAPI.Expose
- double value();
+ @StableAPI.Expose double value();
}
/**
@@ -197,8 +186,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultString {
- @StableAPI.Expose
- String value();
+ @StableAPI.Expose String value();
}
@@ -215,8 +203,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface StringMaxLength {
- @StableAPI.Expose
- int value();
+ @StableAPI.Expose int value();
}
/**
@@ -227,8 +214,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface Pattern {
- @StableAPI.Expose
- String value();
+ @StableAPI.Expose String value();
}
/**
@@ -240,8 +226,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultEnum {
- @StableAPI.Expose
- String value();
+ @StableAPI.Expose String value();
}
/**
@@ -253,8 +238,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultStringList {
- @StableAPI.Expose
- String[] value();
+ @StableAPI.Expose String[] value();
}
/**
@@ -266,8 +250,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultDoubleList {
- @StableAPI.Expose
- double[] value();
+ @StableAPI.Expose double[] value();
}
/**
@@ -279,8 +262,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultIntList {
- @StableAPI.Expose
- int[] value();
+ @StableAPI.Expose int[] value();
}
/**
@@ -292,8 +274,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface DefaultBooleanList {
- @StableAPI.Expose
- boolean[] value();
+ @StableAPI.Expose boolean[] value();
}
/**
@@ -319,8 +300,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface ListMaxLength {
- @StableAPI.Expose
- int value();
+ @StableAPI.Expose int value();
}
@@ -332,8 +312,7 @@ public @interface Config {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@interface Name {
- @StableAPI.Expose
- String value();
+ @StableAPI.Expose String value();
}
/**
diff --git a/src/main/java/com/falsepattern/lib/dependencies/DependencyLoader.java b/src/main/java/com/falsepattern/lib/dependencies/DependencyLoader.java
index 517d2b3..19d00f4 100644
--- a/src/main/java/com/falsepattern/lib/dependencies/DependencyLoader.java
+++ b/src/main/java/com/falsepattern/lib/dependencies/DependencyLoader.java
@@ -51,7 +51,9 @@ public class DependencyLoader {
@DeprecationDetails(deprecatedSince = "0.10.0")
@StableAPI.Expose
public static void loadLibrary(@NonNull String loadingModId, @NonNull String groupId, @NonNull String artifactId, @NonNull Version minVersion, Version maxVersion, @NonNull Version preferredVersion, String regularSuffix, String devSuffix) {
- FalsePatternLib.getLog().warn(DependencyLoader.class.getName() + ".loadLibrary is deprecated and will be removed in FalsePatternLib 0.11! Use loadLibraries instead!");
+ FalsePatternLib.getLog()
+ .warn(DependencyLoader.class.getName() +
+ ".loadLibrary is deprecated and will be removed in FalsePatternLib 0.11! Use loadLibraries instead!");
DependencyLoaderImpl.loadLibrary(loadingModId, groupId, artifactId, minVersion, maxVersion, preferredVersion,
regularSuffix, devSuffix);
}
diff --git a/src/main/java/com/falsepattern/lib/dependencies/Library.java b/src/main/java/com/falsepattern/lib/dependencies/Library.java
index b4495c2..96d6cb3 100644
--- a/src/main/java/com/falsepattern/lib/dependencies/Library.java
+++ b/src/main/java/com/falsepattern/lib/dependencies/Library.java
@@ -6,17 +6,22 @@ import lombok.NonNull;
@StableAPI(since = "0.10.0")
public class Library {
@StableAPI.Expose
- @NonNull public final String loadingModId;
+ @NonNull
+ public final String loadingModId;
@StableAPI.Expose
- @NonNull public final String groupId;
+ @NonNull
+ public final String groupId;
@StableAPI.Expose
- @NonNull public final String artifactId;
+ @NonNull
+ public final String artifactId;
@StableAPI.Expose
- @NonNull public final Version minVersion;
+ @NonNull
+ public final Version minVersion;
@StableAPI.Expose
public final Version maxVersion;
@StableAPI.Expose
- @NonNull public final Version preferredVersion;
+ @NonNull
+ public final Version preferredVersion;
@StableAPI.Expose
public final String regularSuffix;
@StableAPI.Expose
diff --git a/src/main/java/com/falsepattern/lib/dependencies/SemanticVersion.java b/src/main/java/com/falsepattern/lib/dependencies/SemanticVersion.java
index 743df51..2c30c82 100644
--- a/src/main/java/com/falsepattern/lib/dependencies/SemanticVersion.java
+++ b/src/main/java/com/falsepattern/lib/dependencies/SemanticVersion.java
@@ -111,7 +111,8 @@ public class SemanticVersion extends Version {
@Override
public String toString() {
- return majorVersion + (minorVersion < 0 ? "" : "." + minorVersion) + (patchVersion < 0 ? "" : "." + patchVersion) + (preRelease == null ? "" : "-" + preRelease) +
+ return majorVersion + (minorVersion < 0 ? "" : "." + minorVersion) +
+ (patchVersion < 0 ? "" : "." + patchVersion) + (preRelease == null ? "" : "-" + preRelease) +
(build == null ? "" : "+" + build);
}
diff --git a/src/main/java/com/falsepattern/lib/internal/config/LibraryConfig.java b/src/main/java/com/falsepattern/lib/internal/config/LibraryConfig.java
index d066a36..812b346 100644
--- a/src/main/java/com/falsepattern/lib/internal/config/LibraryConfig.java
+++ b/src/main/java/com/falsepattern/lib/internal/config/LibraryConfig.java
@@ -46,11 +46,8 @@ public class LibraryConfig {
public static ValidationLogging CONFIG_ERROR_LOUDNESS;
public enum ValidationLogging {
- @StableAPI.Expose(since = "__INTERNAL__")
- None,
- @StableAPI.Expose(since = "__INTERNAL__")
- Log,
- @StableAPI.Expose(since = "__INTERNAL__")
- LogAndToast
+ @StableAPI.Expose(since = "__INTERNAL__") None,
+ @StableAPI.Expose(since = "__INTERNAL__") Log,
+ @StableAPI.Expose(since = "__INTERNAL__") LogAndToast
}
}
diff --git a/src/main/java/com/falsepattern/lib/internal/config/ToastConfig.java b/src/main/java/com/falsepattern/lib/internal/config/ToastConfig.java
index 23e5637..4a28103 100644
--- a/src/main/java/com/falsepattern/lib/internal/config/ToastConfig.java
+++ b/src/main/java/com/falsepattern/lib/internal/config/ToastConfig.java
@@ -55,9 +55,7 @@ public class ToastConfig {
}
public enum Side {
- @StableAPI.Expose(since = "__INTERNAL__")
- Left,
- @StableAPI.Expose(since = "__INTERNAL__")
- Right
+ @StableAPI.Expose(since = "__INTERNAL__") Left,
+ @StableAPI.Expose(since = "__INTERNAL__") Right
}
}
diff --git a/src/main/java/com/falsepattern/lib/internal/impl/config/ConfigurationManagerImpl.java b/src/main/java/com/falsepattern/lib/internal/impl/config/ConfigurationManagerImpl.java
index e582b38..8a3abb5 100644
--- a/src/main/java/com/falsepattern/lib/internal/impl/config/ConfigurationManagerImpl.java
+++ b/src/main/java/com/falsepattern/lib/internal/impl/config/ConfigurationManagerImpl.java
@@ -197,7 +197,8 @@ public class ConfigurationManagerImpl {
val opt = serializedNames.keySet().stream().filter((key) -> key.equals(serializedName)).findFirst();
if (!opt.isPresent()) {
input.skipBytes(dataSize);
- FalsePatternLib.getLog().warn("Server tried to sync config not registered on our side: " + serializedName);
+ FalsePatternLib.getLog()
+ .warn("Server tried to sync config not registered on our side: " + serializedName);
continue;
}
val clazz = serializedNames.get(opt.get());
diff --git a/src/main/java/com/falsepattern/lib/internal/impl/config/ParsedConfiguration.java b/src/main/java/com/falsepattern/lib/internal/impl/config/ParsedConfiguration.java
index 4014c25..7f2c7e4 100644
--- a/src/main/java/com/falsepattern/lib/internal/impl/config/ParsedConfiguration.java
+++ b/src/main/java/com/falsepattern/lib/internal/impl/config/ParsedConfiguration.java
@@ -22,6 +22,7 @@ package com.falsepattern.lib.internal.impl.config;
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigException;
+import com.falsepattern.lib.internal.ReflectionUtil;
import com.falsepattern.lib.internal.impl.config.fields.AConfigField;
import com.falsepattern.lib.internal.impl.config.fields.BooleanConfigField;
import com.falsepattern.lib.internal.impl.config.fields.BooleanListConfigField;
@@ -33,7 +34,6 @@ import com.falsepattern.lib.internal.impl.config.fields.IntConfigField;
import com.falsepattern.lib.internal.impl.config.fields.IntListConfigField;
import com.falsepattern.lib.internal.impl.config.fields.StringConfigField;
import com.falsepattern.lib.internal.impl.config.fields.StringListConfigField;
-import com.falsepattern.lib.internal.ReflectionUtil;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.val;
diff --git a/src/main/java/com/falsepattern/lib/internal/impl/dependencies/DependencyLoaderImpl.java b/src/main/java/com/falsepattern/lib/internal/impl/dependencies/DependencyLoaderImpl.java
index bbfcf38..053c1b3 100644
--- a/src/main/java/com/falsepattern/lib/internal/impl/dependencies/DependencyLoaderImpl.java
+++ b/src/main/java/com/falsepattern/lib/internal/impl/dependencies/DependencyLoaderImpl.java
@@ -154,7 +154,7 @@ public class DependencyLoaderImpl {
public static CompletableFuture