Posted 09 November 2012 - 08:38 PM
Basically, I have been working on a simple peripheral for turtles, and when it is ran through mcp and eclipse, it works perfectly. When running in mcp, I do have the full computer craft mod running by using immibis' Bearded Octo Nemesis. The problem happens when I re-obfuscate, and put both Computer Craft and my add-on into the mods folder.
The problem it has is that the class dan200.turtle.api.ITurtleUpgrade is not found at runtime. I have checked to make sure that this was the location of the class when compiling the mod, but have been unsuccessful in figuring out how to fix the issue.
The class that seems to be causing the issue (mod_CCAddons.java)
The crash log:
// On the bright side, I bought you a teddy bear!
Time: 08/11/12 11:19 PM
Description: Failed to start game
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: someone9999.ccaddons.mod_CCAddons
at cpw.mods.fml.common.LoadController.transition(LoadController.java:117)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)
at net.minecraft.client.Minecraft.a(Minecraft.java:420)
at net.minecraft.client.Minecraft.run(Minecraft.java:752)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: someone9999.ccaddons.mod_CCAddons
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:126)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadBaseModClass(ModClassLoader.java:87)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:488)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:478)
… 4 more
Caused by: java.lang.NullPointerException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.minecraftforge.transformers.EventTransformer.transform(EventTransformer.java:29)
at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:163)
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119)
… 32 more
Relevant Details:
- Minecraft Version: 1.4.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_03, Oracle Corporation
- Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 390830816 bytes (372 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB)
- JVM Flags: 2 total; -Xmx1024m -Xms512m
- AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
- FML: MCP v7.19 FML v4.2.6.422 Minecraft Forge 6.0.1.341 6 mods loaded, 6 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
mod_CCAddons [mod_CCAddons] (cc3.zip) Unloaded->Errored
ComputerCraft [ComputerCraft] (ComputerCraft1.46.zip) Unloaded->Constructed
CCTurtle [ComputerCraft Turtles] (ComputerCraft1.46.zip) Unloaded->Constructed
- LWJGL: 2.8.3
- OpenGL: GeForce GTX 560M/PCIe/SSE2 GL version 4.2.0, NVIDIA Corporation
- Is Modded: Definitely; 'forge,fml'
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
- Vec3 Pool Size: ~ERROR~ NullPointerException: null
Any help would be greatly appreciated. Thanks.
Edit: Some extra information, probably not important.
The peripheral that this mod adds in a upgrade to a turtle that allows the user to get the block id, block name, block metadata, and block count from the currently selected slot in the turtle.
Edit 2:
Thanks for the help Espen and Cloudy! I really appreciate it.
For anyone in the future who has the same problem as me, make sure that you add a mcmod.info file to your .zip, and list CCTurtle as a dependency.
Ex:
The problem it has is that the class dan200.turtle.api.ITurtleUpgrade is not found at runtime. I have checked to make sure that this was the location of the class when compiling the mod, but have been unsuccessful in figuring out how to fix the issue.
The class that seems to be causing the issue (mod_CCAddons.java)
Spoiler
package someone9999.ccaddons;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.modloader.ModLoaderGuiHelper;
import dan200.turtle.api.TurtleAPI;
import net.minecraft.src.BaseMod;
import net.minecraft.src.Block;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraftforge.client.MinecraftForgeClient;
public class mod_CCAddons extends BaseMod {
public static final ItemAnalyzer itemAnalyzer = (ItemAnalyzer) new ItemAnalyzer(1000).setIconCoord(0, 0).setItemName("item.analyzer");
@SidedProxy(clientSide="someone9999.ccaddons.RenderProxyClient", serverSide="someone9999.ccaddons.RenderProxyServer")
public static IRenderProxy renderProxy;
@Override
public String getVersion() {
return "1";
}
@Override
public void load() {
renderProxy.initForge();
ModLoader.addName(itemAnalyzer, "Analyzer");
addRecipes();
}
@Override
public void modsLoaded() {
System.out.println(ModLoader.getLoadedMods());
System.out.println("All mods loaded. Beginning API hooks.");
notifyComputerCraft();
}
private void addRecipes() {
ModLoader.addShapelessRecipe(new ItemStack(itemAnalyzer.shiftedIndex, 1, 0), new Object[] { Block.dirt });
ModLoader.addShapelessRecipe(new ItemStack(Block.wood.blockID, 64, 0), new Object[] { Block.dirt, Block.dirt });
ModLoader.addShapelessRecipe(new ItemStack(Block.glass.blockID, 64, 0), new Object[] { Block.dirt, Block.dirt, Block.dirt });
ModLoader.addShapelessRecipe(new ItemStack(Item.ingotIron.shiftedIndex, 64, 0), new Object[] { Block.dirt, Block.dirt, Block.dirt, Block.dirt });
ModLoader.addShapelessRecipe(new ItemStack(Block.stone.blockID, 64, 0), new Object[] { Item.ingotIron } );
ModLoader.addShapelessRecipe(new ItemStack(Item.redstone.shiftedIndex, 64, 0), new Object[] { Block.stone, Block.stone } );
}
private void notifyComputerCraft() {
System.out.println("Attempting to integrate with Computer Craft.");
TurtleAPI.registerUpgrade(new TurtleUpgradeAnalyzer());
}
}
The crash log:
Spoiler
—- Minecraft Crash Report —-// On the bright side, I bought you a teddy bear!
Time: 08/11/12 11:19 PM
Description: Failed to start game
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: someone9999.ccaddons.mod_CCAddons
at cpw.mods.fml.common.LoadController.transition(LoadController.java:117)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)
at net.minecraft.client.Minecraft.a(Minecraft.java:420)
at net.minecraft.client.Minecraft.run(Minecraft.java:752)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: someone9999.ccaddons.mod_CCAddons
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:126)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadBaseModClass(ModClassLoader.java:87)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:488)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:478)
… 4 more
Caused by: java.lang.NullPointerException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.minecraftforge.transformers.EventTransformer.transform(EventTransformer.java:29)
at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:163)
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119)
… 32 more
Relevant Details:
- Minecraft Version: 1.4.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_03, Oracle Corporation
- Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 390830816 bytes (372 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB)
- JVM Flags: 2 total; -Xmx1024m -Xms512m
- AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
- FML: MCP v7.19 FML v4.2.6.422 Minecraft Forge 6.0.1.341 6 mods loaded, 6 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
mod_CCAddons [mod_CCAddons] (cc3.zip) Unloaded->Errored
ComputerCraft [ComputerCraft] (ComputerCraft1.46.zip) Unloaded->Constructed
CCTurtle [ComputerCraft Turtles] (ComputerCraft1.46.zip) Unloaded->Constructed
- LWJGL: 2.8.3
- OpenGL: GeForce GTX 560M/PCIe/SSE2 GL version 4.2.0, NVIDIA Corporation
- Is Modded: Definitely; 'forge,fml'
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
- Vec3 Pool Size: ~ERROR~ NullPointerException: null
Any help would be greatly appreciated. Thanks.
Edit: Some extra information, probably not important.
The peripheral that this mod adds in a upgrade to a turtle that allows the user to get the block id, block name, block metadata, and block count from the currently selected slot in the turtle.
Edit 2:
Thanks for the help Espen and Cloudy! I really appreciate it.
For anyone in the future who has the same problem as me, make sure that you add a mcmod.info file to your .zip, and list CCTurtle as a dependency.
Ex:
[
{
"modid": "someone9999.ccaddons",
"dependencies": [
"mod_MinecraftForge",
"CCTurtle"
],
"useDependencyInformation": "true"
}
]