Mazetar Posted September 2, 2012 Posted September 2, 2012 I have completed the initial goal of my Tagger Rails mod and while waiting for a friend to test it and give feedback I started working on my 2nd mod. I have just created the basic setup for creating a forge mod and try to run the client to confirm that the mod is working when it crashes with the following two errors: cpw.mods.fml.common.LoaderException: java.lang.IllegalArgumentException: Can not set static com.mazetar.aimod.common.Aimod field com.mazetar.aimod.common.Aimod.aimodInstance to com.mazetar.taggerrails.common.TaggerRails at cpw.mods.fml.common.LoadController.transition(LoadController.java:102) And error two: java.lang.IllegalArgumentException: Can not set static com.mazetar.taggerrails.common.TaggerRails field com.mazetar.taggerrails.common.TaggerRails.instance to com.mazetar.aimod.common.Aimod at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source) at java.lang.reflect.Field.set(Unknown Source) at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:331) So it seems to me that the @Instance annotation does for each mod is conflicting with each other? TaggerRails.Java - summary of content: package com.mazetar.taggerrails.common; // Some imports @Mod(modid = "MazTaggerRails", name = "TaggerRails", version = "0.0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = true, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"TaggerRailsChan"}, packetHandler = ClientPacketHandler.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"TaggerRailsChan"}, packetHandler = ServerPacketHandler.class)) public class TaggerRails { @SidedProxy(clientSide = "com.mazetar.taggerrails.client.ClientProxy", serverSide = "com.mazetar.taggerrails.common.CommonProxy") public static CommonProxy proxy; @Instance public static TaggerRails instance; //Later inn the code @Init public void load(FMLInitializationEvent evt) { NetworkRegistry.instance().registerGuiHandler(instance, proxy); This mod was working fine on its own. Then I added my new project into its own package, named "com.mazetar.aimod". With its own package handlers, Proxy files and its own mod file. Aimod.java - summary of contents. package com.mazetar.aimod.common; // lots of imports @Mod(modid = "MazAiMod", name = "MazetarianAiMod", version = "0.0.2") @NetworkMod(clientSideRequired = true, serverSideRequired = true, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"MazAiChan"}, packetHandler = ClientPacketHandler.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"MazAiChan"}, packetHandler = ServerPacketHandler.class)) public class Aimod { @SidedProxy(clientSide = "com.mazetar.aimod.client.ClientProxy", serverSide = "com.mazetar.aimod.common.CommonProxy") public static CommonProxy proxy; @Instance public static Aimod aimodInstance; @PreInit public void preInit(FMLPreInitializationEvent event) { } @Init public void load(FMLInitializationEvent evt) { NetworkRegistry.instance().registerGuiHandler(aimodInstance, proxy); } I tried renaming the Aimod instance to aimodInstance incase the name of the variable itself would have something to say, it didn't change anything. Been trying to find places where I reffere to Aimod instead of TaggerRails and vica verca without finding any. Does anyone have a clue for how to solve this? Quote If you guys dont get it.. then well ya.. try harder...
Viper283 Posted September 2, 2012 Posted September 2, 2012 @instance("yourmod"), should fix it, i had the same problem but cpw fixed it on buildcraft Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.