Jump to content

[1.7.10]GameRegistry throws an error?


deadrecon98

Recommended Posts

For some reason every time I try to run the mod (with the minecraft client) it crashes but in the dev environment it works fine.

 

Crash Report

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 3/1/15 6:03 PM
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:692)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:541)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)
at net.minecraft.client.main.Main.main(SourceFile:148)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.lang.ExceptionInInitializerError
at com.Cyphereion.RunesOfAltura.Manager.ObjectManager.registerCraftManagerRecipe(ObjectManager.java:169)
at com.Cyphereion.RunesOfAltura.Manager.ObjectManager.registerObjects(ObjectManager.java:124)
at com.Cyphereion.RunesOfAltura.Manager.ObjectManager.loadItems(ObjectManager.java:98)
at com.Cyphereion.RunesOfAltura.RunesOfAltura.init(RunesOfAltura.java:70)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
... 10 more
Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: eventHandler
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:94)
at com.Cyphereion.RunesOfAltura.Manager.CraftManager.<clinit>(CraftManager.java:76)
... 41 more
Caused by: java.lang.NoSuchFieldException: eventHandler
at java.lang.Class.getDeclaredField(Unknown Source)
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:85)
... 42 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 848811608 bytes (809 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 5 mods loaded, 5 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{7.10.85.1230} [Forge Mod Loader] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{10.13.2.1230} [Minecraft Forge] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized
CustomLanPort{0.0.1} [CustomLanPort] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
RoA{1.0.0.2} [Runes of Altura] (Runes of Altura-1.7.10-1.0.0.2.jar) Unloaded->Constructed->Pre-initialized->Errored

 

The code it points to

	166:public static void registerCraftManagerRecipe(){
	167:List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
	168:IRecipe recipe = recipes.remove(recipes.size() - 1);
	169:GameRegistry.addRecipe(
	170:		new CraftManager(
	171:				recipe));
}

 

More code can be found here.

Link to comment
Share on other sites

I see you used diesieben07's tutorial. Read the replies, you'll find the SRG names. Add them to the lines following like so:

private static final Field eventHandlerField = ReflectionHelper.findField(InventoryCrafting.class, "eventHandler", 
"srgEventHandlerNameGoesHere");
private static final Field containerPlayerPlayerField = ReflectionHelper.findField(ContainerPlayer.class, "thePlayer", 
"sameForThePlayer");
private static final Field slotCraftingPlayerField = ReflectionHelper.findField(SlotCrafting.class, "thePlayer", andSoOn);

Maker of the Craft++ mod.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.