mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-17 01:45:12 +00:00
Annotate all the things
This commit is contained in:
63 files changed
+623
-369
No files matched your search
@@ -45,12 +45,15 @@ import static java.nio.file.Files.walk;
|
||||
|
||||
@StableAPI(since = "0.8.0")
|
||||
public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
@StableAPI.Expose
|
||||
Path MODS_DIRECTORY_PATH = FileUtil.getMinecraftHome().toPath().resolve("mods");
|
||||
|
||||
@StableAPI.Expose
|
||||
static Logger createLogger(String modName) {
|
||||
return LogManager.getLogger(modName + " Mixin Loader");
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
static File findJarOf(final ITargetedMod mod) {
|
||||
try (val stream = walk(MODS_DIRECTORY_PATH)) {
|
||||
return stream.filter(mod::isMatchingJar).map(Path::toFile).findFirst().orElse(null);
|
||||
@@ -60,6 +63,15 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
Logger getLogger();
|
||||
|
||||
@StableAPI.Expose
|
||||
IMixin[] getMixinEnumValues();
|
||||
|
||||
@StableAPI.Expose
|
||||
ITargetedMod[] getTargetedModEnumValues();
|
||||
|
||||
@Override
|
||||
default void onLoad(String mixinPackage) {
|
||||
|
||||
@@ -107,8 +119,6 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
return mixins;
|
||||
}
|
||||
|
||||
ITargetedMod[] getTargetedModEnumValues();
|
||||
|
||||
default boolean loadJarOf(final ITargetedMod mod) {
|
||||
boolean success = false;
|
||||
try {
|
||||
@@ -130,10 +140,6 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
return success;
|
||||
}
|
||||
|
||||
Logger getLogger();
|
||||
|
||||
IMixin[] getMixinEnumValues();
|
||||
|
||||
@Override
|
||||
default void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user