Jump to content

Custom armor crash


tacotj

Recommended Posts

I made a mod and it was working. then i decided i want armor for the new ores, i made the armor and it works in single player but it wont work on a server. please help. here is the crash code:

 

---- Minecraft Crash Report ----

// Daisy, daisy...

 

Time: 8/11/13 2:34 PM

Description: Exception in server tick loop

 

cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.src.ModLoader.addArmor(Ljava/lang/String;)I

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

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)

at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:93)

at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)

at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:141)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430)

at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)

Caused by: java.lang.NoSuchMethodError: net.minecraft.src.ModLoader.addArmor(Ljava/lang/String;)I

at NewEraOres.Tutorial.TutorialMod.load(TutorialMod.java:204)

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.initializeMods(Loader.java:690)

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

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.6.0_34, Sun Microsystems Inc.

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Sun Microsystems Inc.

Memory: 997508672 bytes (951 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 2 total; -Xmx1024M -Xms1024M

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.51 FML v5.2.12.712 Minecraft Forge 7.8.0.712 6 mods loaded, 6 mods active

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

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

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

CustomSpawner{2.2.2} [DrZhark's CustomSpawner] (CustomMobSpawner 2.2.2.zip) Unloaded->Constructed->Pre-initialized->Initialized

MoCreatures{5.2.3} [DrZhark's Mo'Creatures Mod] (DrZharks MoCreatures Mod v5.2.3.zip) Unloaded->Constructed->Pre-initialized->Initialized

NewEraOres{v2} [NewEraOres] (NewEraOres.zip) Unloaded->Constructed->Pre-initialized->Errored

Profiler Position: N/A (disabled)

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

Type: Dedicated Server (map_server.txt)

 

Link to comment
Share on other sites

Look what the method does. Never use ModLoader methods when coding with forge, they are just wrappers. And if you want to use this method you have to do it in your ClientProxy, Armor RenderIds are clientside only.

I suggest you use Item.getArmorTexture.

can you explain to me how to do it because i am really new to coding....

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.