Glorfindel22 Posted March 24, 2014 Posted March 24, 2014 Okay, so I have completed updating my forge mod to 1.7.2 and it works in the testing environment exactly how I want it to; however, when I after I built it using gradle when I run it in Minecraft a window comes up for a second closes and I get the following error: ---- Minecraft Crash Report ---- // Sorry Time: 3/24/14 4:22 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.item.Item.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item; at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.loadMods(Loader.java:497) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:498) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:853) at net.minecraft.client.main.Main.main(SourceFile:103) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoSuchMethodError: net.minecraft.item.Item.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item; at net.richardsprojects.recipexpack.main.ItemGrassSeeds.initializeItem(ItemGrassSeeds.java:18) at net.richardsprojects.recipexpack.main.ItemGrassSeeds.mainRegistry(ItemGrassSeeds.java:10) at net.richardsprojects.recipexpack.main.RecipeExpansionPack.preInit(RecipeExpansionPack.java:62) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:495) ... 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.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 135091216 bytes (128 MB) / 454033408 bytes (433 MB) up to 1908932608 bytes (1820 MB) JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G 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.01-pre FML v7.2.125.1034 Minecraft Forge 10.12.0.1034 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.2.125.1034} [Forge Mod Loader] (forge-1.7.2-10.12.0.1034.jar) Unloaded->Constructed->Pre-initialized Forge{10.12.0.1034} [Minecraft Forge] (forge-1.7.2-10.12.0.1034.jar) Unloaded->Constructed->Pre-initialized rep{0.0.7 Alpha} [Recipe Expansion Pack] (RecipeXPack-1.7.2-0.1.2.zip) Unloaded->Constructed->Errored Below is the code in my ItemGrassSeeds class: package net.richardsprojects.recipexpack.main; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; public class ItemGrassSeeds { public static void mainRegistry() { initializeItem(); registerItem(); } public static Item grassSeeds; public static void initializeItem() { grassSeeds = new Item().setUnlocalizedName("grassSeeds").setCreativeTab(RecipeExpansionPack.tabRecipeXPack).setTextureName("rep:grassSeeds"); } public static void registerItem() { GameRegistry.registerItem(grassSeeds, grassSeeds.getUnlocalizedName()); } }[/Code] I am both developing and running my Mod in forge build 10.12.0.1034. I do not understand how in the exact same build of Forge the mod runs fine in Eclipse but doesn't work in Minecraft. This is very fustrating because I was planning on releasing an update to my mod today. Any help would be greatly appreciated. Quote Creator of the Recipe Expansion Pack mod. http://www.minecraftforum.net/topic/1983421-172-forge-recipe-expansion-pack-version-012/ Updated to 1.7.2!
Glorfindel22 Posted March 24, 2014 Author Posted March 24, 2014 Well I hate to bump the thread but I really wanted to release this mod tonight. Quote Creator of the Recipe Expansion Pack mod. http://www.minecraftforum.net/topic/1983421-172-forge-recipe-expansion-pack-version-012/ Updated to 1.7.2!
Glorfindel22 Posted March 24, 2014 Author Posted March 24, 2014 I built it by running the "gradlew build" command in command prompt and I got the jar file from the "libs" folder inside of "build". Quote Creator of the Recipe Expansion Pack mod. http://www.minecraftforum.net/topic/1983421-172-forge-recipe-expansion-pack-version-012/ Updated to 1.7.2!
Glorfindel22 Posted March 25, 2014 Author Posted March 25, 2014 Yeah I followed a tutorial and they told me to modify the version, group, & archivesBaseName fields. Below is what my build.gradle file looks like: buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT' } } apply plugin: 'forge' version = "1.7.2-0.1.2" group= "net.richardsprojects" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RecipeExpansionPack" minecraft { version = "1.7.2-10.12.0.1024" assetDir = "eclipse/assets" } processResources { // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }[/Code] Quote Creator of the Recipe Expansion Pack mod. http://www.minecraftforum.net/topic/1983421-172-forge-recipe-expansion-pack-version-012/ Updated to 1.7.2!
coolAlias Posted March 25, 2014 Posted March 25, 2014 Forge gradle / Minecraft don't seem to get along all the time; when I've had similar exceptions, I was able to get it working by running the gradle commands with "--refresh-dependencies", for example "gradlew --refresh-dependencies eclipse" will refresh all of the class paths etc. If you run through setting up the workspace with refresh dependencies on all the commands and it still doesn't work, maybe try updating to a later version of Forge as sometimes it gets broken. Quote http://i.imgur.com/NdrFdld.png[/img]
larsgerrits Posted March 26, 2014 Posted March 26, 2014 In 1.7.2, setUnlocalizedName() is now called setBlockName() if i recall correctly. Quote 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/
tiffit Posted March 26, 2014 Posted March 26, 2014 Blocks - .setBlockName("PutStuffHere") Items - .setUnlocalizedName("PutStuffHere"); Quote
Recommended Posts
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.