Jump to content

Recommended Posts

Posted

hello there, I'm trying to make my first mod now.

 

I'd just added a simple block and simple item which implement buildcraft's IToolWrench.

and i'd added a simple recipe and buildcraft assembly table recipe, just for experiment.

and finally, i pressed the 'RUN' button in eclipse, and...it worked well.

 

then why have i started this topic?

 

cuz such a strange problem occurred.

 

after i export all of my packages to jar file and threw it into my client's mods folder, my mod always makes crash.

 

full crash report is here.

 

 

---- Minecraft Crash Report ----

// Hey, that tickles! Hehehe!

 

Time: 13. 5. 20 오후 6:07

Description: Failed to start game

 

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

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: iron

at citizen.test.Test.preInit(Test.java:45)

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.GeneratedMethodAccessor3.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

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.5.1

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_21, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 364160440 bytes (347 MB) / 519110656 bytes (495 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 2 total; -Xms512m -Xmx1024m

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

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

FML: MCP v7.44 FML v5.1.43.679 Minecraft Forge 7.7.2.679 83 mods loaded, 83 mods active

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

FML{5.1.43.679} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized

Forge{7.7.2.679} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized

CodeChickenCore{0.8.6.1} [CodeChicken Core] (coremods) Unloaded->Constructed->Pre-initialized

CoFHCore{1.5.1.5} [CoFH Core] (coremods) Unloaded->Constructed->Pre-initialized

NotEnoughItems{1.5.2.9} [Not Enough Items] (coremods) Unloaded->Constructed->Pre-initialized

PowerCrystalsCore{1.1.3} [PowerCrystals Core] (coremods) Unloaded->Constructed->Pre-initialized

mod_ReiMinimap{v3.3_04 [1.5.1]} [mod_ReiMinimap] (minecraft.jar) Unloaded->Constructed->Pre-initialized

CoFHNetwork{1.5.1.5} [CoFHNetwork] (CoFHCore-1.5.1.5.jar) Unloaded->Constructed->Pre-initialized

CoFHWorld{1.5.1.5} [CoFHWorld] (CoFHCore-1.5.1.5.jar) Unloaded->Constructed->Pre-initialized

jammyfurniture{4.2} [Jammy Furniture Mod] (1.5.1_Jammy_Furniture_Mod_V4.3.zip) Unloaded->Constructed->Pre-initialized

Chainz_Core{1.0.4} [Chainz] (1.5.1Chainz_v1.1.4Forge.zip) Unloaded->Constructed->Pre-initialized

HarkenScythe_Core{2.1.2} [HarkenScythe] (1.5.1HarkenScythe_v2.1.2Forge.zip) Unloaded->Constructed->Pre-initialized

BasicComponents{1.3.2} [basic Components] (BasicComponents_v1.3.2.73.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Core{3.5.0} [buildCraft] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Transport{3.5.0} [bC Transport] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Silicon{3.5.0} [bC Silicon] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

ThermalExpansion{2.4.1.0} [Thermal Expansion] (ThermalExpansion-2.4.1.0.jar) Unloaded->Constructed->Pre-initialized

IC2{1.115.305-lf} [industrialCraft 2] (industrialcraft-2_1.115.305-lf.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Builders{3.5.0} [bC Builders] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Energy{3.5.0} [bC Energy] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

BuildCraft|Factory{3.5.0} [bC Factory] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded{1.5.1R2.5.4} [MineFactory Reloaded] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

AppliedEnergistics{rv.10.m} [Applied Energistics] (appeng-rv10-m.zip) Unloaded->Constructed->Pre-initialized

ArsMagica{5.50.010} [Ars Magica] (ArsMagica_5.50.010.zip) Unloaded->Constructed->Pre-initialized

AssemblyLine{0.3.5.102} [Assembly Line] (AssemblyLine_v0.3.5.102.jar) Unloaded->Constructed->Pre-initialized

AtomicScience{0.5.1} [Atomic Science] (Atomic_Science_v0.5.1.15.jar) Unloaded->Constructed->Pre-initialized

BiblioCraft{1.2.0} [biblioCraft] (BiblioCraft[v1.2.0].zip) Unloaded->Constructed->Pre-initialized

BiomesOPlenty{0.5.1} [biomes O' Plenty] (Biomes-O-Plenty-0.5.1.zip) Unloaded->Constructed->Pre-initialized

mod_Compression{1.5.1} [mod_Compression] (Compacted Blocks 1.5.1 V1.4.zip) Unloaded->Constructed->Pre-initialized

ComputerCraft{1.52} [ComputerCraft] (ComputerCraft1.52.zip) Unloaded->Constructed->Pre-initialized

CCTurtle{1.52} [ComputerCraft Turtles] (ComputerCraft1.52.zip) Unloaded->Constructed->Pre-initialized

CustomStuff2{0.9.12d Beta} [Custom Stuff 2] (customStuff2-0.9.12d-universal.zip) Unloaded->Constructed->Pre-initialized

factorization{0.7.37} [Factorization] (Factorization-0.7.37.jar) Unloaded->Constructed->Pre-initialized

ExtrabiomesXL{3.13.0} [ExtrabiomesXL] (ExtrabiomesXL-universal-1.5.1-3.13.0.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatForestryPre{1.5.1R2.5.4} [MFR Compat: Forestry (2)] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

Forestry{2.2.0.2} [Forestry for Minecraft] (forestry-A-2.2.0.2.jar) Unloaded->Constructed->Pre-initialized

IronChest{5.2.4.383} [iron Chest] (ironchest-universal-1.5.1-5.2.4.383.zip) Unloaded->Constructed->Pre-initialized

Railcraft{7.1.0.0} [Railcraft] (Railcraft_1.5.1-7.1.0.0.jar) Unloaded->Constructed->Pre-initialized

Thaumcraft{3.0.4c} [Thaumcraft] (Thaumcraft3.0.4c.zip) Unloaded->Constructed->Pre-initialized

TwilightForest{1.17.2} [The Twilight Forest] (twilightforest-1.17.2.zip) Unloaded->Constructed->Pre-initialized

DartCraft{Beta 0.1.13} [DartCraft] (DartCraft Beta 0.1.13.jar) Unloaded->Constructed->Pre-initialized

BinnieCore{1.6-pre3} [binnie Core] (extra-bees-1.6-pre3.jar) Unloaded->Constructed->Pre-initialized

ExtraBees{1.6-pre3} [Extra Bees] (extra-bees-1.6-pre3.jar) Unloaded->Constructed->Pre-initialized

ExtraUtilities{0.2} [Extra Utilities] (extrautils-0.2.0.zip) Unloaded->Constructed->Pre-initialized

factorization.misc{0.7.37} [Factorization Miscellaneous Nonsense] (Factorization-0.7.37.jar) Unloaded->Constructed->Pre-initialized

factorization.dimensionalSlice{0.7.37} [Factorization Dimensional Slices] (Factorization-0.7.37.jar) Unloaded->Constructed->Pre-initialized

Mekanism{5.5.5} [Mekanism] (Mekanism-v5.5.5.34.jar) Unloaded->Constructed->Pre-initialized

MekanismGenerators{5.5.5} [MekanismGenerators] (MekanismGenerators-v5.5.5.34.jar) Unloaded->Constructed->Pre-initialized

ImmibisCore{54.0.2} [immibis Core] (immibis-core-54.0.2.jar) Unloaded->Constructed->Pre-initialized

Tubestuff{54.0.0} [Tubestuff] (tubestuff-54.0.0.jar) Unloaded->Constructed->Pre-initialized

GregTech_Addon{MC151_V3.04} [GregTech-Addon] (gregtechmod.zip) Unloaded->Constructed->Pre-initialized

IC2NuclearControl{1.5.1b} [Nuclear Control] (IC2NuclearControl-1.5.1b.zip) Unloaded->Constructed->Pre-initialized

inventorytweaks{1.53} [inventory Tweaks] (InventoryTweaks-1.53.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatAtum{1.5.1R2.5.4} [MFR Compat: Atum] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatBiomesOPlenty{1.5.1R2.5.4} [MFR Compat: Biomes O' Plenty] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatChococraft{1.5.1R2.5.4} [MFR Compat: Chococraft] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatExtraBiomes{1.5.1R2.5.4} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatForestry{1.5.1R2.5.4} [MFR Compat: Forestry] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatIC2{1.5.1R2.5.4} [MFR Compat: IC2] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatMagicalCrops{1.5.1R2.5.4} [MFR Compat: Magical Crops] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

Natura{1.5.1_2.0.19} [Natura] (Natura_1.5.1_2.0.19.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatNatura{1.5.1R2.5.4} [MFR Compat: Natura] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatPams{1.5.1R2.5.4} [MFR Compat: Pam's Mods] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatRP2{1.5.1R2.5.4} [MFR Compat: RP2] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatSoulShards{1.5.1R2.5.4} [MFR Compat: SoulShards] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatSufficientBiomes{1.5.1R2.5.4} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MFReloaded|CompatThaumcraft{1.5.1R2.5.4} [MFR Compat: Thaumcraft] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

TConstruct{1.5.1_1.3.3.14} [Tinkers' Construct] (TConstruct_1.3.3.15.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatTConstruct{1.5.1R2.5.4} [MFR Compat: TConstruct] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatTwilightForest{1.5.1R2.5.4} [MFR Compat: TwilightForest] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatVanilla{1.5.1R2.5.4} [MFR Compat: Vanilla] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

MineFactoryReloaded|CompatXyCraft{1.5.1R2.5.4} [MFR Compat: XyCraft] (MineFactoryReloaded-2.5.4-665.jar) Unloaded->Constructed->Pre-initialized

NEIPlugins{1.0.8.0} [NEI Plugins] (NEIPlugins-1.0.8.0.jar) Unloaded->Constructed->Pre-initialized

OCS{0.1.5} [OpenCCSensors] (OpenCCSensors-0.1.5c.jar) Unloaded->Constructed->Pre-initialized

RecipeRemover{0.3} [Recipe Remover] (Reciperemover-v0.3.zip) Unloaded->Constructed->Pre-initialized

mod_SmartMoving{13.8} [smart Moving] (Smart Moving Universal for ModLoader or Minecraft Forge or MCPC+.zip) Unloaded->Constructed->Pre-initialized

mod_SmartRender{1.1} [smart Render] (Smart Moving Universal for ModLoader or Minecraft Forge or MCPC+.zip) Unloaded->Constructed->Pre-initialized

StevesCarts{2.0.0.a110} [steve's Carts] (StevesCarts2.0.0.a110.zip) Unloaded->Constructed->Pre-initialized

Test{0.1.0} [Test] (test.jar) Unloaded->Constructed->Errored

ThaumicBees{1.4.6 - 171} [ThaumicBees] (thaumicbees-1.4.6.jar) Unloaded->Constructed->Pre-initialized

weaponmod{1.5.1 v1.11.1} [balkon's WeaponMod] (WeaponMod.zip) Unloaded->Constructed->Pre-initialized

OmniTools{3.1.2.0} [OmniTools] (OmniTools-3.1.2.0.jar) Unloaded->Constructed->Pre-initialized

LWJGL: 2.4.2

OpenGL: GeForce 7300 SE/7200 GS/PCIe/SSE2 GL version 2.1.2, NVIDIA Corporation

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Texture Pack: Default

Profiler Position: N/A (disabled)

Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

 

 

 

and my mod's source file is here.

 

 

package citizen.test;

 

import buildcraft.api.recipes.AssemblyRecipe;

import citizen.test.block.BlockTest;

import citizen.test.items.ItemTest;

import citizen.test.proxy.CommonProxy;

import net.minecraft.block.Block;

import net.minecraft.block.material.MapColor;

import net.minecraft.block.material.Material;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.Property;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.Instance;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

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

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

 

@Mod(name = "Test", version = "0.1.0", modid = "Test")

@NetworkMod(channels = "Test", clientSideRequired = true, serverSideRequired = false)

public class Test {

 

 

@Instance("Test")

public static Test instance;

 

@SidedProxy(clientSide = "citizen.test.proxy.ClientProxy", serverSide = "citizen.test.proxy.CommonProxy")

public static CommonProxy proxy;

 

 

 

public static Block testBlock;

public static Item testItem;

 

@PreInit

public void preInit(FMLPreInitializationEvent event) {

 

testBlock = new BlockTest(2500, Material.iron).setUnlocalizedName("TestBlock");

testItem = new ItemTest(5000).setUnlocalizedName("TestItem");

 

}

 

@Init

public void init(FMLInitializationEvent event) {

 

proxy.registerBlocks();

 

GameRegistry.addRecipe(new ItemStack(testBlock), " W ", "WWW", " W ", Character.valueOf('W'), Block.wood);

 

 

}

 

@PostInit

public void postInit(FMLPostInitializationEvent event) {

 

AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(Block.wood, 1), new ItemStack(Block.glass, 1)}, 5000, new ItemStack(testItem)));

 

 

}

 

}

 

 

 

 

what should i do? :-(

 

 

i'm korean, and i'm pretty not good at english.

and this is my first topic in MCF forum.

so my writing can be so rude and messy. sorry for that.

and thanks for reading my topic ^^

Posted

I just used eclipse's "export" function and i'm sure my source codes changed to .class file

And reobfuscate.... i dont know what is and how to reobfuscate :-(cry)

Posted

Don't do that…

Look at a minecraft.jar in your normal minecraft installation - the classes, methods and fields there have weird names - that's because mojang obfuscate their code, so nobody can really get what it all means by just looking at it.

MCP deobfuscates it when you install it, so you can look at the minecraft code and see what it means. But when you want to use your mod with a normal minecraft installation again, you need to reobfuscate it again, so all the class, method and field names fit.

 

 

So basically what you have to do is run recompile.bat (or .sh when on a mac), that file should be in your mcp folder.

Then run reobfuscate_srg.bat (or .sh when on a mac). After that, all your class files should end up in "[mcp-root]/reobf/minecraft/". You need to copy your image files there yourself.

 

 

It all should work, assuming you have a normal mcp installation and all your mod files are in "[mcp-root]/src/minecraft". If they aren't, you have to copy them there.

 

 

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.