-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Mixin loading and it should fix #1
- Loading branch information
Showing
13 changed files
with
67 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...op/mixin/CrashProof_ModularGui_Mixin.java → ...xin/late/CrashProof_ModularGui_Mixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/Insurance_BaseMetaTileEntity_Mixin.java → ...e/Insurance_BaseMetaTileEntity_Mixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/kotlin/cn/taskeren/op/mixin_plugin/OP_LateMixin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@file:Suppress("SpellCheckingInspection") | ||
|
||
package cn.taskeren.op.mixin_plugin | ||
|
||
import com.gtnewhorizon.gtnhmixins.ILateMixinLoader | ||
import com.gtnewhorizon.gtnhmixins.LateMixin | ||
import net.minecraft.launchwrapper.Launch | ||
import org.apache.logging.log4j.LogManager | ||
|
||
@LateMixin | ||
class OP_LateMixin : ILateMixinLoader { | ||
|
||
val logger = LogManager.getLogger("OP:LateMixin") | ||
val dev = Launch.blackboard["fml.deobfuscatedEnvironment"] as Boolean | ||
|
||
override fun getMixinConfig(): String? { | ||
return "mixins.Overpowered.late.json" | ||
} | ||
|
||
override fun getMixins(loadedMods: Set<String>): List<String> { | ||
logger.info("Initializing Late Mixins") | ||
if(dev) { | ||
loadedMods.forEach { logger.info("Loaded Mod: {}", it) } | ||
} | ||
|
||
val mixinClasses = mutableListOf<String>() | ||
if("gregtech" in loadedMods) { | ||
mixinClasses += "Insurance_BaseMetaTileEntity_Mixin" | ||
} | ||
if("modularui" in loadedMods) { | ||
mixinClasses += "CrashProof_ModularGui_Mixin" | ||
} | ||
|
||
mixinClasses.forEach { logger.info("Applied Mixin: {}", it) } | ||
return mixinClasses | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
98 changes: 0 additions & 98 deletions
98
src/main/kotlin/cn/taskeren/op/mixin_plugin/OP_MixinPlugin.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8.3-GTNH", | ||
"package": "cn.taskeren.op.mixin", | ||
"plugin": "cn.taskeren.op.mixin_plugin.OP_MixinPlugin", | ||
"mixins": [ | ||
], | ||
"client": [ | ||
] | ||
"refmap": "mixins.Overpowered.refmap.json", | ||
"target": "@env(DEFAULT)", | ||
"compatibilityLevel": "JAVA_8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8.3-GTNH", | ||
"package": "cn.taskeren.op.mixin.late", | ||
"refmap": "mixins.Overpowered.refmap.json", | ||
"target": "@env(DEFAULT)", | ||
"compatibilityLevel": "JAVA_8" | ||
} |