mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-17 14:35:01 +00:00
chore: move @since javadoc into ApiStatus.AvailableSince annotations
This commit is contained in:
37 files changed
+140
-218
No files matched your search
@@ -22,6 +22,8 @@
|
||||
|
||||
package com.falsepattern.lib;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -31,18 +33,16 @@ import java.lang.annotation.RetentionPolicy;
|
||||
* <p>
|
||||
* Used together with {@link Deprecated} to specify when an API was marked stable, and when it was marked for deprecation.
|
||||
* Deprecated classes MAY be removed after a full deprecation cycle as described inside the {@link StableAPI} javadoc.
|
||||
* @since 0.10.0
|
||||
* @deprecated since 1.7.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface DeprecationDetails {
|
||||
String deprecatedSince();
|
||||
|
||||
/**
|
||||
* @since 0.11.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.11.0")
|
||||
String replacement() default "";
|
||||
|
||||
/**
|
||||
@@ -50,9 +50,9 @@ public @interface DeprecationDetails {
|
||||
* <p>
|
||||
* This marks an API for removal in a future version.
|
||||
*
|
||||
* @since 0.12.0
|
||||
* @deprecated since 1.7.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.12.0")
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
package com.falsepattern.lib;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -55,8 +57,8 @@ import java.lang.annotation.Target;
|
||||
* error, unlike __INTERNAL__, but if any issues arise from the usage of the API or the API changing, the API developer
|
||||
* shall not be blamed for it.
|
||||
* @deprecated since 1.7.0
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@@ -80,8 +82,8 @@ public @interface StableAPI {
|
||||
* inner classes still need to use {@link StableAPI}.
|
||||
*
|
||||
* @deprecated since 1.7.0
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@@ -99,8 +101,8 @@ public @interface StableAPI {
|
||||
* changed or removed in any version in the library without prior notice.
|
||||
*
|
||||
* @deprecated since 1.7.0
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Deprecated
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.asm.exceptions;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.asm.exceptions;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.asm;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.asm;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -29,6 +29,7 @@ import lombok.Setter;
|
||||
import lombok.val;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -364,9 +365,7 @@ public class BlockPos extends Vec3i {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Setter
|
||||
@Getter
|
||||
public static class MutableBlockPos extends BlockPos {
|
||||
@@ -453,9 +452,7 @@ public class BlockPos extends Vec3i {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static final class PooledMutableBlockPos extends BlockPos.MutableBlockPos {
|
||||
private static final List<BlockPos.PooledMutableBlockPos> POOL = new ArrayList<>();
|
||||
private boolean released;
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.falsepattern.lib.compat;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -38,9 +39,8 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* A functional equivalent to GuiLabel present in Minecraft 1.12.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.8.0")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiLabel extends Gui {
|
||||
private final List<String> lines = new ArrayList<>();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.6.0
|
||||
*/
|
||||
package com.falsepattern.lib.compat;
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
package com.falsepattern.lib.compat;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.falsepattern.lib.config;
|
||||
|
||||
import org.intellij.lang.annotations.Language;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -94,9 +95,8 @@ public @interface Config {
|
||||
* Define category migrations here.
|
||||
* Used to rename config categories without losing data.
|
||||
* @see #pathMigrations()
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
String[] categoryMigrations() default {};
|
||||
|
||||
/**
|
||||
@@ -110,9 +110,8 @@ public @interface Config {
|
||||
* customPath = "mymod.config" -> .minecraft/config/mymod.config
|
||||
* <br>
|
||||
* @see #modid()
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
String customPath() default "";
|
||||
|
||||
/**
|
||||
@@ -126,9 +125,8 @@ public @interface Config {
|
||||
* the category of this config.
|
||||
* @see #customPath()
|
||||
* @see #categoryMigrations()
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
String[] pathMigrations() default {};
|
||||
|
||||
// region Common
|
||||
@@ -182,9 +180,8 @@ public @interface Config {
|
||||
|
||||
/**
|
||||
* Use this to migrate from old config names. "" is resolved to the name of the field
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
String[] migrations() default {};
|
||||
}
|
||||
|
||||
@@ -214,9 +211,8 @@ public @interface Config {
|
||||
* <p>
|
||||
* Note that synchronization ALWAYS happens FROM the server TO the client. The server should NEVER attempt to get
|
||||
* configuration values from a client. This is to avoid malicious clients manipulating the server configs.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@@ -224,9 +220,8 @@ public @interface Config {
|
||||
|
||||
/**
|
||||
* Use this to mark config fields you don't want to synchronize in a class marked with {@link Synchronize}.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -281,9 +276,8 @@ public @interface Config {
|
||||
/**
|
||||
* The default value for a double field.
|
||||
* @see RangeDouble
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -293,9 +287,8 @@ public @interface Config {
|
||||
|
||||
/**
|
||||
* The range of possible values a double config can have.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -325,9 +318,8 @@ public @interface Config {
|
||||
* This annotation limits the maximum number of characters present in a string configuration.
|
||||
* <p>
|
||||
* When used with a string list, this limit will apply to each element individually, not to the size of the list as a whole.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -368,9 +360,8 @@ public @interface Config {
|
||||
* The default value for a boolean array field.
|
||||
* @see ListFixedLength
|
||||
* @see ListMaxLength
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -383,9 +374,8 @@ public @interface Config {
|
||||
* @see ListFixedLength
|
||||
* @see ListMaxLength
|
||||
* @see RangeInt
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -398,9 +388,8 @@ public @interface Config {
|
||||
* @see ListFixedLength
|
||||
* @see ListMaxLength
|
||||
* @see RangeDouble
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -426,9 +415,8 @@ public @interface Config {
|
||||
* If this annotation is present, the list in the config will be forced to have exactly the amount of elements as
|
||||
* the default value.
|
||||
* @see ListMaxLength
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@@ -437,9 +425,8 @@ public @interface Config {
|
||||
/**
|
||||
* This annotation limits the maximum number of elements present in an array configuration. Only effective if
|
||||
* {@link ListFixedLength} is NOT present.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
|
||||
@@ -27,6 +27,7 @@ import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
|
||||
@@ -42,26 +43,21 @@ import java.util.function.BiConsumer;
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class ConfigurationManager {
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void initialize(Class<?>... configClasses) throws ConfigException {
|
||||
initialize((a, b) -> {}, configClasses);
|
||||
}
|
||||
|
||||
/**
|
||||
* You can use this method in the static initializer of a config class to self-load it without extra effort.
|
||||
*
|
||||
* @since 0.10.3
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.3")
|
||||
@SneakyThrows
|
||||
public static void selfInit() {
|
||||
initialize(ReflectionUtil.getCallerClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void initialize(BiConsumer<Class<?>, Field> validatorErrorCallback, Class<?>... configClasses)
|
||||
throws ConfigException {
|
||||
for (val clazz : configClasses) {
|
||||
@@ -72,16 +68,12 @@ public class ConfigurationManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static boolean validate(boolean resetInvalid, Class<?>... configClasses) throws ConfigException {
|
||||
return validate((x, y) -> {}, resetInvalid, configClasses);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static boolean validate(BiConsumer<Class<?>, Field> validatorErrorCallback, boolean resetInvalid, Class<?>... configClasses)
|
||||
throws ConfigException {
|
||||
boolean valid = true;
|
||||
@@ -91,18 +83,14 @@ public class ConfigurationManager {
|
||||
return valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void loadFromFile(Class<?>... configClasses) throws ConfigException {
|
||||
for (val clazz : configClasses) {
|
||||
ConfigurationManagerImpl.load(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void saveToFile(boolean validateAndResetInvalid, Class<?>... configClasses) throws ConfigException {
|
||||
for (val clazz : configClasses) {
|
||||
if (validateAndResetInvalid) {
|
||||
@@ -130,9 +118,8 @@ public class ConfigurationManager {
|
||||
* @param configClasses The classes to process.
|
||||
*
|
||||
* @return The configuration elements.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static List<IConfigElement> getConfigElementsMulti(Class<?>... configClasses) throws ConfigException {
|
||||
switch (configClasses.length) {
|
||||
@@ -151,9 +138,8 @@ public class ConfigurationManager {
|
||||
/**
|
||||
* @return The configuration elements, structured with DummyCategoryElement groups per config class
|
||||
* @see #getConfigElementsMulti(Class[])
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static List<IConfigElement> getConfigElementsMultiStructured(Class<?>... configClasses) throws ConfigException {
|
||||
if (configClasses.length == 0) {
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
*/
|
||||
package com.falsepattern.lib.config;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.9.0")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class SimpleGuiConfig extends GuiConfig {
|
||||
public SimpleGuiConfig(GuiScreen parent, Class<?> configClass, String modID, String modName)
|
||||
@@ -36,18 +36,13 @@ public class SimpleGuiConfig extends GuiConfig {
|
||||
this(parent, modID, modName, configClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public SimpleGuiConfig(GuiScreen parent, String modID, String title, Class<?>... configClasses)
|
||||
throws ConfigException {
|
||||
this(parent, modID, title, null, configClasses);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.5.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.5.0")
|
||||
public SimpleGuiConfig(GuiScreen parent, String modID, String title, String titleLine2, Class<?>... configClasses)
|
||||
throws ConfigException {
|
||||
super(parent,
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
package com.falsepattern.lib.config;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -28,9 +30,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.9.0")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface SimpleGuiFactory extends IModGuiFactory {
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.config.event;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.config.event;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.6.0
|
||||
*/
|
||||
package com.falsepattern.lib.config;
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
package com.falsepattern.lib.config;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.falsepattern.lib.dependencies;
|
||||
|
||||
import com.falsepattern.lib.internal.impl.dependencies.DependencyLoaderImpl;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@@ -35,16 +36,12 @@ public class DependencyLoader {
|
||||
DependencyLoaderImpl.addMavenRepo(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static CompletableFuture<Void> loadLibrariesAsync(Library... libraries) {
|
||||
return DependencyLoaderImpl.loadLibrariesAsync(libraries).thenApply(list -> null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void loadLibraries(Library... libraries) {
|
||||
DependencyLoaderImpl.loadLibraries(libraries);
|
||||
}
|
||||
|
||||
@@ -26,9 +26,7 @@ import lombok.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public class Library {
|
||||
@NonNull
|
||||
public final String loadingModId;
|
||||
@@ -62,9 +60,7 @@ public class Library {
|
||||
return new LibraryBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static class LibraryBuilder {
|
||||
private String loadingModId;
|
||||
private String groupId;
|
||||
|
||||
@@ -58,17 +58,13 @@ public class SemanticVersion extends Version {
|
||||
this(majorVersion, minorVersion, patchVersion, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public SemanticVersion(int majorVersion, int minorVersion) {
|
||||
this(majorVersion, minorVersion, -1, null, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public SemanticVersion(int majorVersion) {
|
||||
this(majorVersion, -1, -1, null, null);
|
||||
}
|
||||
@@ -119,9 +115,7 @@ public class SemanticVersion extends Version {
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static class SemanticVersionBuilder {
|
||||
private int majorVersion;
|
||||
private int minorVersion = -1;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.falsepattern.lib.dependencies;
|
||||
|
||||
import com.falsepattern.lib.internal.impl.dependencies.DependencyLoaderImpl;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
public abstract class Version implements Comparable<Version> {
|
||||
protected Version() {
|
||||
@@ -39,10 +40,7 @@ public abstract class Version implements Comparable<Version> {
|
||||
return compareTo(other) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.7.0")
|
||||
public static Version parse(String versionString) {
|
||||
return DependencyLoaderImpl.parseVersion(versionString);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.6.0
|
||||
*/
|
||||
package com.falsepattern.lib.dependencies;
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
package com.falsepattern.lib.dependencies;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
+3
-6
@@ -27,6 +27,7 @@ import com.falsepattern.lib.dependencies.Library;
|
||||
import com.falsepattern.lib.dependencies.SemanticVersion;
|
||||
import com.falsepattern.lib.dependencies.Version;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -38,9 +39,7 @@ public class DependencyLoaderImpl {
|
||||
com.falsepattern.deploader.DependencyLoaderImpl.addMavenRepo(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static CompletableFuture<Void> loadLibrariesAsync(Library... libraries) {
|
||||
val libs = new com.falsepattern.deploader.Library[libraries.length];
|
||||
for (int i = 0; i < libraries.length; i++) {
|
||||
@@ -49,9 +48,7 @@ public class DependencyLoaderImpl {
|
||||
return com.falsepattern.deploader.DependencyLoaderImpl.loadLibrariesAsync(libs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static void loadLibraries(Library... libraries) {
|
||||
val libs = new com.falsepattern.deploader.Library[libraries.length];
|
||||
for (int i = 0; i < libraries.length; i++) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.mapping;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.mapping;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.mapping.types;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.mapping.types;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.falsepattern.lib.mixin;
|
||||
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
@@ -41,18 +42,14 @@ public interface IMixin {
|
||||
|| side == Side.CLIENT && FMLLaunchHandler.side().isClient()) && getFilter().test(loadedMods);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
enum Side {
|
||||
COMMON,
|
||||
CLIENT,
|
||||
SERVER
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
final class PredicateHelpers {
|
||||
public static Predicate<List<ITargetedMod>> never() {
|
||||
return (list) -> false;
|
||||
|
||||
@@ -82,9 +82,7 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.4.0")
|
||||
static Set<File> findJarsOf(IMixinPlugin self, final ITargetedMod mod) {
|
||||
if (!self.useNewFindJar()) {
|
||||
val jar = findJarOf(mod);
|
||||
@@ -116,9 +114,7 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
|
||||
ITargetedMod[] getTargetedModEnumValues();
|
||||
|
||||
/**
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.4.0")
|
||||
default boolean useNewFindJar() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package com.falsepattern.lib.mixin;
|
||||
import com.falsepattern.lib.internal.impl.mixin.UCPImpl;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -31,9 +32,8 @@ import java.io.File;
|
||||
* Backport from spongemixins 1.3 for compat with the curseforge 1.2.0 version.
|
||||
* <p>
|
||||
* Also added Grimoire protection.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public final class MinecraftURLClassPath {
|
||||
public static void addJar(File pathToJar) throws Exception {
|
||||
|
||||
@@ -31,9 +31,7 @@ import net.minecraft.launchwrapper.Launch;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @since 0.10.2
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.2")
|
||||
public final class MixinInfo {
|
||||
public static final MixinBootstrapperType mixinBootstrapper;
|
||||
|
||||
@@ -65,16 +63,12 @@ public final class MixinInfo {
|
||||
return mixinBootstrapper == MixinBootstrapperType.MixinBooterLegacy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.14
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.14")
|
||||
public static boolean isGasStation() {
|
||||
return mixinBootstrapper == MixinBootstrapperType.GasStation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.15
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.15")
|
||||
public static boolean isUniMixin() {
|
||||
return mixinBootstrapper == MixinBootstrapperType.UniMixin;
|
||||
}
|
||||
@@ -129,18 +123,16 @@ public final class MixinInfo {
|
||||
return MixinBootstrapperType.Other;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.10.2
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.2")
|
||||
public enum MixinBootstrapperType {
|
||||
None,
|
||||
/** @since 0.10.9 */
|
||||
@ApiStatus.AvailableSince("0.10.9")
|
||||
GasStation,
|
||||
SpongeMixins,
|
||||
Grimoire,
|
||||
MixinBooterLegacy,
|
||||
Other,
|
||||
/** @since 0.10.15 */
|
||||
@ApiStatus.AvailableSince("0.10.15")
|
||||
UniMixin
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
package com.falsepattern.lib.mixin;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -31,9 +32,8 @@ import java.util.List;
|
||||
/**
|
||||
* This is a class you can use to interact with MixinInfo before it gets classloaded.
|
||||
* (Originally placed here for future unimixins compat in case they change the class names)
|
||||
*
|
||||
* @since 0.10.15
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.15")
|
||||
public class MixinInfoCompatCompanion {
|
||||
/**
|
||||
* A list of all mixin classes that are candidates for unimixins.
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.8.0
|
||||
*/
|
||||
package com.falsepattern.lib.mixin;
|
||||
@ApiStatus.AvailableSince("0.8.0")
|
||||
package com.falsepattern.lib.mixin;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -20,9 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 1.9.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.9.0")
|
||||
@ApiStatus.Experimental
|
||||
package com.falsepattern.lib.mixin.v2;
|
||||
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
package com.falsepattern.lib.optifine;
|
||||
|
||||
import com.falsepattern.lib.internal.impl.optifine.OptiFineTransformerHooksImpl;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* A utility for manipulating OptiFine's patches.
|
||||
* If you have a mod that injects code that would otherwise conflict with OptiFine, and you have provably tested that
|
||||
* removing certain OptiFine patches from the jar does NOT break anything, you may use this class to disable them
|
||||
* without having to do jar file edits.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.0.0")
|
||||
public class OptiFineTransformerHooks {
|
||||
public static void disableOptiFinePatch(String patchName) {
|
||||
OptiFineTransformerHooksImpl.disableOptiFinePatch(patchName);
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.falsepattern.lib.text;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
@@ -51,9 +52,8 @@ import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Universal escape sequence-based text rendering and chat messages.
|
||||
*
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
public final class FormattedText {
|
||||
private static final Map<Character, EnumChatFormatting> reverseMap = new HashMap<>();
|
||||
private static final Map<EnumChatFormatting, Color> colorMap = new HashMap<>();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.toasts.icon;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.toasts.icon;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -20,7 +20,7 @@
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.toasts;
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
package com.falsepattern.lib.toasts;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.falsepattern.lib.util;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
|
||||
@@ -29,18 +30,14 @@ import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* @since 0.8.2
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.8.2")
|
||||
@UtilityClass
|
||||
public final class FileUtil {
|
||||
public static File getMinecraftHome() {
|
||||
return getMinecraftHomePath().toFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.0.0")
|
||||
public static Path getMinecraftHomePath() {
|
||||
return Launch.minecraftHome == null ? Paths.get("").toAbsolutePath() : Launch.minecraftHome.toPath();
|
||||
}
|
||||
|
||||
@@ -24,15 +24,14 @@ package com.falsepattern.lib.util;
|
||||
import lombok.NonNull;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.8.0")
|
||||
@UtilityClass
|
||||
public final class LangUtil {
|
||||
public static final String DEFAULT_LOCALE = "en_US";
|
||||
|
||||
@@ -23,13 +23,12 @@ package com.falsepattern.lib.util;
|
||||
|
||||
import com.falsepattern.lib.compat.Vec3i;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
@UtilityClass
|
||||
public final class MathUtil {
|
||||
public static final float SQRT_2 = sqrt(2.0F);
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.falsepattern.lib.internal.render.FullTextureIcon;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -40,9 +41,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import static cpw.mods.fml.relauncher.Side.CLIENT;
|
||||
import static net.minecraft.client.Minecraft.getMinecraft;
|
||||
|
||||
/**
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.8.0")
|
||||
@SideOnly(CLIENT)
|
||||
@UtilityClass
|
||||
public final class RenderUtil {
|
||||
@@ -55,9 +54,8 @@ public final class RenderUtil {
|
||||
* This is useful for rendering things that are not part of the world mesh, but should be rendered as if they were.
|
||||
* <p>
|
||||
* It's good practice to make this call inside a {@link GL11#glPushMatrix() push}/{@link GL11#glPopMatrix() pop} matrix block.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.12.0")
|
||||
public static void setGLTranslationRelativeToPlayer() {
|
||||
val player = getMinecraft().thePlayer;
|
||||
val partialTick = partialTick();
|
||||
@@ -79,9 +77,8 @@ public final class RenderUtil {
|
||||
* @param height The icon height in pixels
|
||||
*
|
||||
* @return The full resolution texture icon.
|
||||
*
|
||||
* @since 0.10.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.10.0")
|
||||
public static IIcon getFullTextureIcon(String iconName, int width, int height) {
|
||||
return new FullTextureIcon(iconName, width, height);
|
||||
}
|
||||
@@ -94,9 +91,8 @@ public final class RenderUtil {
|
||||
* This is helpful when using {@link RenderBlocks} but having different bounds.
|
||||
*
|
||||
* @param icon The icon to clamp
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.12.0")
|
||||
public static IIcon wrapAsClampedIcon(IIcon icon) {
|
||||
return new ClampedIcon(icon);
|
||||
}
|
||||
@@ -108,9 +104,8 @@ public final class RenderUtil {
|
||||
* is sufficient to achieve the same effect.
|
||||
* <p>
|
||||
* However, when shaders are enabled, disabling textures using this method will have no effect. Therefore this method can be used as a workaround.
|
||||
*
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("1.3.0")
|
||||
public static void bindEmptyTexture() {
|
||||
getMinecraft().renderEngine.bindTexture(EMPTY_TEXTURE);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package com.falsepattern.lib.util;
|
||||
import com.falsepattern.lib.internal.FPLog;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -35,9 +36,8 @@ import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* A utility class for reading resources in many ways.
|
||||
*
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@ApiStatus.AvailableSince("0.6.0")
|
||||
@UtilityClass
|
||||
public final class ResourceUtil {
|
||||
|
||||
|
||||
Reference in new issue
Block a user