Jump to content

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


Thecheatgamer1

Recommended Posts

Well i coded this what is my BlockFusionOre.java class

 

package com.Thecheatgamer1.Annom.Block;

 

import com.Thecheatgamer1.Annom.Lib.Textures;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IconRegister;

 

public class BlockFusionOre extends Block {

 

    public BlockFusionOre(int id) {

 

        super(id, Material.ground);

    }

 

    public void updateIcons(IconRegister iconRegister) {

       

        blockIcon = iconRegister.registerIcon(Textures.FUSIONORE_LOCATION);

    }

 

    public Block setIconIndex(int i) {

 

        return null;

    }

   

}

 

And this is my ModBlocks.java class, its so i dont trash the main class with all the block loading and resource code!

 

package com.Thecheatgamer1.Annom.Block;

 

import com.Thecheatgamer1.Annom.Annom;

import com.Thecheatgamer1.Annom.Lib.BlockIds;

import com.Thecheatgamer1.Annom.Lib.Strings;

 

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.Block;

 

public class ModBlocks {

 

    /* Mod block instances */

    public static Block fusionore;

 

    public static void init() {

 

        fusionore = new BlockFusionOre(BlockIds.FUSIONORE).setUnlocalizedName(Strings.FUSIONORE_NAME).setCreativeTab(Annom.tabsAnnom).setHardness(100.0F).setResistance(60.0F).setLightValue(1.0F);

 

        GameRegistry.registerBlock(fusionore, Strings.FUSIONORE_NAME);

       

        LanguageRegistry.addName(fusionore, "Fusion ore");

 

    }

}

 

 

Everytime i start up minecraft with this, it gives me this crash log! :o

 

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

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

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

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

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

  at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)

  at net.minecraft.client.Minecraft.run(Minecraft.java:732)

  at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NoSuchFieldError: ground

  at com.Thecheatgamer1.Annom.Block.BlockFusionOre.<init>(BlockFusionOre.java:13)

  at com.Thecheatgamer1.Annom.Block.ModBlocks.init(ModBlocks.java:18)

  at com.Thecheatgamer1.Annom.Annom.preInit(Annom.java:87)

  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:494)

  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:74)

  at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

  at com.google.common.eventbus.EventBus.post(EventBus.java:267)

  at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)

  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:74)

  at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

  at com.google.common.eventbus.EventBus.post(EventBus.java:267)

  at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)

  at cpw.mods.fml.common.Loader.loadMods(Loader.java:514)

  ... 5 more

--- END ERROR REPORT f1d2c4b1 ----------

 

 

 

Can someone tell me how to fix this

 

i looked in the net.minecraft.materials.Materials class and i found the groud material but it comes up with this

Link to comment
Share on other sites

Well lexmanos told me to obfuscate my mod.... what i clearly dont know how to do, does anyone know if hes right and how to do it

 

or can anyone give me some true advice :S

If you're running MCP the right way, just run recompile.sh and reobfuscate_srg.sh and pull your class files out of reobf/. (and your resources out of src/mods/)

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

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.