Jump to content

[1.7.10 - 10.13.1.1217] Mod working fine in eclipse and crashing in launcher


Christofmeg

Recommended Posts

Okay I'm trying to create a block. When I'm running the mod in eclipse everything works fine, but the mod is crashing when I'm testing it with the vanilla minecraft launcher.

 

The numbers on the side is the line numers.

 

Here is a part of the main class nationalscience:

67      @EventHandler
68      public void PreInitialize(FMLPreInitializationEvent event)
69      {
70         NSBlocks.init();
71      }

 

Here is a part of the NSBlocks class:

21      public final class NSBlocks 
22      {
23         public static Block CompressedCobble;
24
25         public static void init() 
26         {
27            CompressedCobble = new BlockCompressedCobble().setBlockName("compressedcobble");
28            GameRegistry.registerBlock(CompressedCobble, ItemCompressedCobble.class, CompressedCobble.getUnlocalizedName().substring(5));
29         }
30      }

 

Here is a part of the BlockCompressedCobble class:

22      public class BlockCompressedCobble extends Block 
23      {
24         public BlockCompressedCobble() 
25         {
26            super(Material.rock);
27            this.setHardness(3.0F);
28            this.setResistance(5.0F);
29            this.setCreativeTab(CreativeTabs.tabBlock);
30         }
31      }

 

Here is the crashreport:

 

 

---- Minecraft Crash Report ----

// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

 

Time: 08.10.14 10:36

Description: There was a severe problem during mod loading that has caused the game to fail

 

cpw.mods.fml.common.LoaderException: java.lang.NoSuchFieldError: rock

at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)

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.NoSuchFieldError: rock

at nationalscience.block.BlockCompressedCobble.<init>(BlockCompressedCobble.java:26)

at nationalscience.NSBlocks.init(NSBlocks.java:27)

at nationalscience.nationalscience.PreInitialize(nationalscience.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.preinitializeMods(Loader.java:513)

... 10 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.7.0_11, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 94953592 bytes (90 MB) / 260415488 bytes (248 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.84.1217 Minecraft Forge 10.13.1.1217 6 mods loaded, 6 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{7.10.84.1217} [Forge Mod Loader] (forge-1.7.10-10.13.1.1217.jar) Unloaded->Constructed->Pre-initialized

Forge{10.13.1.1217} [Minecraft Forge] (forge-1.7.10-10.13.1.1217.jar) Unloaded->Constructed->Pre-initialized

CodeChickenCore{1.0.3.26} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized

NotEnoughItems{1.0.3.56} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.3.56-universal.jar) Unloaded->Constructed->Pre-initialized

NationalScience{1.7.10-A1} [NationalScience] (National Science-1.7.10-A1.jar) Unloaded->Constructed->Errored

 

 

Link to comment
Share on other sites

Ok, the problem is that MC cant find the field Material.rock. This is because Minecraft is obfuscated, the field is named something like field_085468_a or so.

How did you compile your mod? Forge gradle normally does the obfuscation for you, or did this build fail for some reason?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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