Jump to content

Crash from setUnlocalizedName


ComputerDude

Recommended Posts

I am adding an Item to my mod, but when the client starts I get a NoSuchMethodError from setUnlocalizedName.

Crash

 

---- Minecraft Crash Report ----

 

WARNING: coremods are present:

Contact their authors BEFORE contacting forge

 

// Sorry :(

 

Time: 12/13/16 4:54 PM

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

 

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Mo' Cake Mod (mocakemod)

Caused by: java.lang.NoSuchMethodError: com.computerdude.cake.items.ItemDough.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item;

at com.computerdude.cake.items.ItemDough.<init>(ItemDough.java:12)

at com.computerdude.cake.init.ModItems.init(ModItems.java:18)

at com.computerdude.cake.Main.PreInit(Main.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:600)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:614)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:257)

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

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351)

at net.minecraft.client.main.Main.main(SourceFile:124)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

 

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

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.10.2

Operating System: Windows 10 (amd64) version 10.0

Java Version: 1.8.0_25, Oracle Corporation

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

Memory: 118808504 bytes (113 MB) / 397025280 bytes (378 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

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP 9.32 Powered by Forge 12.18.3.2185 Optifine OptiFine_1.10.2_HD_U_D4 4 mods loaded, 4 mods active

States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)

UCH FML{8.0.99.99} [Forge Mod Loader] (forge-1.10.2-12.18.3.2185.jar)

UCH Forge{12.18.3.2185} [Minecraft Forge] (forge-1.10.2-12.18.3.2185.jar)

UCE mocakemod{1.0.0} [Mo' Cake Mod] (Mod Test.jar)

Loaded coremods (and transformers):

GL info: ' Vendor: 'Intel' Version: '3.1.0 - Build 9.17.10.4229' Renderer: 'Intel® HD Graphics 3000'

OptiFine Version: OptiFine_1.10.2_HD_U_D4

Render Distance Chunks: 2

Mipmaps: 4

Anisotropic Filtering: 1

Antialiasing: 0

Multitexture: false

Shaders: null

OpenGlVersion: 3.1.0 - Build 9.17.10.4229

OpenGlRenderer: Intel® HD Graphics 3000

OpenGlVendor: Intel

CpuCount: 4

 

 

Item Class

 

package com.computerdude.cake.items;

 

import com.computerdude.cake.CakeMod;

 

import net.minecraft.item.Item;

import net.minecraft.util.ResourceLocation;

 

public class ItemDough extends Item {

 

public ItemDough(String unlocalizedName, String registryName) {

 

this.setUnlocalizedName(unlocalizedName);

this.setRegistryName(new ResourceLocation(CakeMod.MODID, registryName));

 

}

 

}

 

 

ModItems Class

 

package com.computerdude.cake.init;

 

import com.computerdude.cake.CakeMod;

import com.computerdude.cake.items.ItemDough;

import com.computerdude.cake.util.Utils;

 

import net.minecraft.client.renderer.block.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraft.util.ResourceLocation;

import net.minecraftforge.client.model.ModelLoader;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ModItems {

 

public static Item dough;

 

public static void init() {

dough = new ItemDough("dough", "dough");

}

 

public static void register() {

registerItem(dough);

}

 

public static void registerRenders() {

registerRender(dough);

}

 

public static void registerItem(Item item) {

GameRegistry.register(item);

Utils.getLogger().info("Registered Models: " + item.getUnlocalizedName().substring(5));

}

 

public static void registerRender(Item item) {

ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(

new ResourceLocation(CakeMod.MODID, item.getUnlocalizedName().substring(5)), "inventory"));

 

Utils.getLogger().info("Registered Render: " + item.getUnlocalizedName().substring(5));

 

}

 

}

 

 

Link to comment
Share on other sites

How did you export your mod?

 

Theres the thing. Some reason I can't run a minecraft instance through eclipse (http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/2771426-pixel-format-not-accelerated-only-in-eclipse)

 

Also I am not exactly sure how to export correctly, so I Right Click > Export > Jar File and make sure that only src and Resources are selected (and everything inside)

Link to comment
Share on other sites

Disabled the loading screen as described in the EAQ. This should fix the not being able to run Minecraft.

 

To build your mod, run

gradlew build

from the command line, the sam way you setup you workspace.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Disabled the loading screen as described in the EAQ. This should fix the not being able to run Minecraft.

 

To build your mod, run

gradlew build

from the command line, the sam way you setup you workspace.

 

Where is Splash.Properties? Not in config/run where mods is, not in eclipse, not where I would expect it. I searched the whole folder and didn't see it.

 

Also I will try gradlew build.

Link to comment
Share on other sites

Disabled the loading screen as described in the EAQ. This should fix the not being able to run Minecraft.

 

To build your mod, run

gradlew build

from the command line, the sam way you setup you workspace.

 

Okay so gradlew build worked, Thanks. One last thing: I can't find splash.properties as said in the EAQ. Running from eclipse would make it incredibly easier for me.

Link to comment
Share on other sites

It is in your run directory, then in

config/splash.properties

.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

It is in your run directory, then in

config/splash.properties

.

 

It doesnt exist so I will just make it in there using the config from my forge client.

 

UPDATE - I am still getting "Pixel Format not Accelerated" when running. I am not sure if this is helpful or not but this message is spamming console before the crash: "2016-12-14 12:19:35,606 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream"

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Never mind, Turns out it was the quilted fabric loader api or whatever causing it. I got it to work by downgrading it to the previous version.
    • It worked, but neverend-1.0.jar is the main mod I'm trying to get to work.
    • Is it possible to recover an entire folder full of files that were accidentally deleted while I was deleting a single file?
    • Recovering lost funds from online scams has been a daunting journey, and my ordeal with Rapid Digital Recovery underscores the importance of vigilance and education. I recently managed to recover over $338,000 thanks to their expertise, and sharing my story is crucial for raising awareness about these deceitful practices. I fell victim to a sophisticated scam involving fake forex and binary options investment platforms. The scammers created a facade of legitimacy with professional websites, persuasive pitches, and false assurances of high returns. They promised substantial profits and used high-pressure tactics to get me to invest large amounts of money. It wasn’t until I noticed red flags and attempted to withdraw my funds that I realized I had been duped. Rapid Digital Recovery proved to be a lifeline in this situation. Their team worked diligently to investigate the fraud, trace my funds, and liaise with financial institutions to secure the recovery. Their expertise in handling such cases was invaluable, and their efforts ultimately helped me reclaim a significant portion of my lost assets. However, I learned that while these services can be effective, they are not a guaranteed solution. Success depends on various factors, including the nature of the scam and the cooperation of involved parties.  This experience has underscored the critical need for education about online scams. Scammers use a range of tactics to deceive individuals, from fake testimonials to promises of guaranteed returns. Understanding these tactics and recognizing red flags can prevent others from falling into the same trap. Researching investment opportunities thoroughly and verifying the legitimacy of platforms before committing any money are crucial steps. I’ve come to realize that the best way to protect oneself is through education and awareness. By being informed about how scams operate and approaching investments with caution, individuals can safeguard their finances and avoid similar pitfalls. My experience with Rapid Digital Recovery highlights both the importance of being proactive in preventing scams and the value of having a recovery strategy in place if things go wrong. Sharing my story is a way to help others avoid the same mistakes and contribute to a safer online environment.                    
    • It looks like you have a problem one or more of your `.toml` files.
  • Topics

×
×
  • Create New...

Important Information

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