Delete legacy dep file + properly register IFMLLoadingPlugin (#10)

This commit is contained in:
Alexdoru authored and GitHub committed 2025-08-11 17:05:15 +02:00
1 parent 972ccacc69
commit d37209b9e1
7 files changed
+23 -37

No files matched your search

-6
View File
@@ -1,6 +0,0 @@
jar {
manifest {
attributes 'FMLCorePlugin': 'mrtjp.relocation.asm.RelocationPlugin'
attributes 'FMLCorePluginContainsFMLMod': true
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
dependencies {
api 'com.github.GTNewHorizons:MrTJPCore:1.3.0:dev'
api 'com.github.GTNewHorizons:MrTJPCore:1.3.1:dev'
}
+2 -2
View File
@@ -102,7 +102,7 @@ mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
coreModClass = asm.RelocationPlugin
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
@@ -151,7 +151,7 @@ modrinthProjectId =
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
}
-6
View File
@@ -1,6 +0,0 @@
[{
"repo": "https://github.com/GTNewHorizons/MrTJPCore/releases/download/1.1.1/",
"file": "MrTJPCore-1.7.10-1.1.1.jar",
"dev": "MrTJPCore-1.7.10-1.1.1-dev.jar",
"class": "mrtjp.core.handler.MrTJPCoreMod"
}]
@@ -0,0 +1,19 @@
package mrtjp.relocation.asm
import java.util.{Map => JMap}
import cpw.mods.fml.relauncher.IFMLLoadingPlugin
@IFMLLoadingPlugin.MCVersion("1.7.10")
@IFMLLoadingPlugin.TransformerExclusions(value =
Array("mrtjp.relocation.asm.*", "scala")
)
class RelocationPlugin extends IFMLLoadingPlugin {
override def getASMTransformerClass = Array(
"mrtjp.relocation.asm.Transformer"
)
override def getSetupClass = null
override def getModContainerClass = null
override def getAccessTransformerClass = null
override def injectData(data: JMap[String, AnyRef]): Unit = {}
}
@@ -5,12 +5,9 @@
*/
package mrtjp.relocation.asm
import java.util.{Map => JMap}
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.{
INSTANCE => mapper
}
import cpw.mods.fml.relauncher.{IFMLCallHook, IFMLLoadingPlugin}
import mrtjp.relocation.handler.RelocationMod
import net.minecraft.launchwrapper.{IClassTransformer, Launch}
import org.objectweb.asm.Opcodes._
@@ -19,24 +16,6 @@ import org.objectweb.asm.{ClassReader, ClassWriter}
import scala.collection.JavaConversions._
/** Add "Dfml.coreMods.load=mrtjp.relocation.asm.RelocationPlugin" to launch
* configs to enable in a development workspace.
*/
@IFMLLoadingPlugin.MCVersion("1.7.10")
@IFMLLoadingPlugin.TransformerExclusions(value =
Array("mrtjp.relocation.asm.*", "scala")
)
class RelocationPlugin extends IFMLLoadingPlugin with IFMLCallHook {
override def getASMTransformerClass = Array(
"mrtjp.relocation.asm.Transformer"
)
override def getSetupClass = "mrtjp.relocation.asm.RelocationPlugin"
override def getModContainerClass = null
override def getAccessTransformerClass = null
override def injectData(data: JMap[String, AnyRef]): Unit = {}
override def call(): Void = null
}
class Transformer extends IClassTransformer {
type MethodChecker = (String, MethodNode) => Boolean
type InsTransformer = MethodNode => Unit