Using the loading plugin (used for class transformer) as core mod instead of the dummy one.

Also fixed typo in the url in the mod info... how long has that been there?
This commit is contained in:
Florian Nücke 2014-10-14 15:13:25 +02:00
parent a768111886
commit 0b7eb7a578
3 changed files with 21 additions and 12 deletions

View File

@ -4,7 +4,7 @@
"description": "This mod adds modular computers and robots that can be programmed in Lua.", "description": "This mod adds modular computers and robots that can be programmed in Lua.",
"version": "${version}", "version": "${version}",
"mcversion": "${mcversion}", "mcversion": "${mcversion}",
"url": "http://oc.ci.li/", "url": "http://oc.cil.li/",
"authorList": ["Florian 'Sangar' Nuecke", "Johannes 'Lord Joda' Lohrer", "Everyone who contributed to the mod on Github - thank you!"], "authorList": ["Florian 'Sangar' Nuecke", "Johannes 'Lord Joda' Lohrer", "Everyone who contributed to the mod on Github - thank you!"],
"credits" : "Inspired by a couple of other mods, most notably ComputerCraft.", "credits" : "Inspired by a couple of other mods, most notably ComputerCraft.",
"logoFile" : "assets/opencomputers/textures/gui/logo.png", "logoFile" : "assets/opencomputers/textures/gui/logo.png",

View File

@ -1,8 +0,0 @@
package li.cil.oc
import cpw.mods.fml.common.Mod
// This empty mod is used to avoid cyclic dependencies with mods we depend on
// for optional interfaces, for example, but that also depend on our API.
@Mod(modid = "OpenComputers|Core", name = "OpenComputers (Core)", version = "1.0.0", modLanguage = "scala")
object OpenComputersCore

View File

@ -2,6 +2,10 @@ package li.cil.oc.common.launch
import java.util import java.util
import com.google.common.eventbus.EventBus
import cpw.mods.fml.common.DummyModContainer
import cpw.mods.fml.common.LoadController
import cpw.mods.fml.common.ModMetadata
import cpw.mods.fml.relauncher.IFMLLoadingPlugin import cpw.mods.fml.relauncher.IFMLLoadingPlugin
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions
@ -9,12 +13,25 @@ import li.cil.oc.common.asm.ClassTransformer
@TransformerExclusions(Array("li.cil.oc.common.asm")) @TransformerExclusions(Array("li.cil.oc.common.asm"))
@MCVersion("1.7.10") @MCVersion("1.7.10")
class TransformerLoader extends IFMLLoadingPlugin { class TransformerLoader extends DummyModContainer({
override def getAccessTransformerClass = null val md = new ModMetadata()
md.authorList.add("Sangar")
md.modId = "OpenComputers|Core"
md.version = "1.0.0"
md.name = "OpenComputers (Core)"
md.url = "http://oc.cil.li/"
md.description = "OC core mod used for class transformer and as API owner to avoid cyclic dependencies."
md
}) with IFMLLoadingPlugin {
val instance = this
override def getModContainerClass = getClass.getName
override def registerBus(bus: EventBus, controller: LoadController) = true
override def getASMTransformerClass = Array(classOf[ClassTransformer].getName) override def getASMTransformerClass = Array(classOf[ClassTransformer].getName)
override def getModContainerClass = null override def getAccessTransformerClass = null
override def getSetupClass = null override def getSetupClass = null