Jump to content

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


Recommended Posts

Posted

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

Posted

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.

Posted

Well i extracted both mcp and forge into 1 folder then i went into the forge folder an use the install file and that is it, my mod is connected to all things correctly

 

 

I copyed pahimars lets plays on how to set it up due to it was confusing at first :D

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You would have better results asking a more specific question. What have you done? What exactly do you need help with? Please also read the FAQ regarding posting logs.
    • Hi, this is my second post with the same content as no one answered this and it's been a long time since I made the last post, I want to make a client-only mod, everything is ok, but when I use shaders, none of the textures rendered in RenderLevelStageEvent nor the crow entity model are rendered, I want them to be visible, because it's a horror themed mod I've already tried it with different shaders, but it didn't work with any of them and I really want to add support for shaders Here is how i render the crow model in the CrowEntityRenderer<CrowEntity>, by the time i use this method, i know is not the right method but i don't think this is the cause of the problem, the renderType i'm using is entityCutout @Override public void render(CrowEntity p_entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { super.render(p_entity, entityYaw, partialTick, poseStack, bufferSource, packedLight); ClientEventHandler.getClient().crow.renderToBuffer(poseStack, bufferSource.getBuffer(ClientEventHandler.getClient().crow .renderType(TEXTURE)), packedLight, OverlayTexture.NO_OVERLAY, Utils.rgb(255, 255, 255)); } Here renderLevelStage @Override public void renderWorld(RenderLevelStageEvent e) { horrorEvents.draw(e); } Here is how i render every event public void draw(RenderLevelStageEvent e) { for (HorrorEvent event : currentHorrorEvents) { event.tick(e.getPartialTick()); event.draw(e); } } Here is how i render the crow model on the event @Override public void draw(RenderLevelStageEvent e) { if(e.getStage() == RenderLevelStageEvent.Stage.AFTER_ENTITIES) { float arcProgress = getArcProgress(0.25f); int alpha = (int) Mth.lerp(arcProgress, 0, 255); int packedLight = LevelRenderer.getLightColor(Minecraft.getInstance().level, blockPos); VertexConsumer builder = ClientEventHandler.bufferSource.getBuffer(crow); Crow<CreepyBirdHorrorEvent> model = ClientEventHandler .getClient().crow; model.setupAnim(this); RenderHelper.renderModelInWorld(model, position, offset, e.getCamera(), e.getPoseStack(), builder, packedLight, OverlayTexture.NO_OVERLAY, alpha); builder = ClientEventHandler.bufferSource.getBuffer(eyes); RenderHelper.renderModelInWorld(model, position, offset, e.getCamera(), e.getPoseStack(), builder, 15728880, OverlayTexture.NO_OVERLAY, alpha); } } How i render the model public static void renderModelInWorld(Model model, Vector3f pos, Vector3f offset, Camera camera, PoseStack matrix, VertexConsumer builder, int light, int overlay, int alpha) { matrix.pushPose(); Vec3 cameraPos = camera.getPosition(); double finalX = pos.x - cameraPos.x + offset.x; double finalY = pos.y - cameraPos.y + offset.y; double finalZ = pos.z - cameraPos.z + offset.z; matrix.pushPose(); matrix.translate(finalX, finalY, finalZ); matrix.mulPose(Axis.XP.rotationDegrees(180f)); model.renderToBuffer(matrix, builder, light, overlay, Utils .rgba(255, 255, 255, alpha)); matrix.popPose(); matrix.popPose(); } Thanks in advance
    • Same issue - I have no idea
    • I am trying to develop a modpack for me and my friends to use on our server. Does anyone know how to develop a modpack for a server or could they help take a look at my modpack to potentially help at all?
    • un server de armas realista.  
  • Topics

×
×
  • Create New...

Important Information

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