Jump to content

Mod Crashes when run on Server


kenoba10

Recommended Posts

Hi. Whenever I run my mod in my minecraft forge server my server crashes Heres my crash log:

---- Minecraft Crash Report ----

// Why did you do that?

 

Time: 7/28/13 10:21 AM

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:148)

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

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

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:443)

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

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

at Kenoba10.Too_Much_Tools.common.Too_Much_Tools.load(Too_Much_Tools.java:284)

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:540)

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:313)

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:193)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)

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:313)

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:104)

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

... 5 more

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.6.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_25, Oracle Corporation

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

Memory: 864370504 bytes (824 MB) / 1029046272 bytes (981 MB) up to 1029046272 bytes (981 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 v8.04 FML v6.2.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active

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

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

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

ToolCraft{Beta 1.0} [Tool Craft] (ToolCraft Beta 1.0.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

I'm using Forge

Not really. The crash is from you calling a ModLoader method.

well it works just fine in my Minecraft and Eclipse but not on the server And this is what the tutorial i watched a few months ago told me to do to create armor

Link to comment
Share on other sites

well it works just fine in my Minecraft and Eclipse but not on the server And this is what the tutorial i watched a few months ago told me to do to create armor

it works fine in the client because FML includes a ModLoader legacy layer so that it can run ModLoader mods. But that only exists on the client (since ModLoader it self is only client-side, too).

If you got this from a tutorial then go kick the author in the butt.

Ok thanks I'll do that but how would I do it otherwise do you know?

Link to comment
Share on other sites

getArmorTexture in the Item class. Thats how it's done properly.

but getArmorTexture returns a string and you need an int. My current code is

CoalHelmet = new ItemCoalHelmet(23252, armorCoal, ModLoader.addArmor("Coal"), 0).setUnlocalizedName("Coal Helmet").setCreativeTab(CreativeTabs.tabCombat);
[/code

Link to comment
Share on other sites

How is the name of a texture an int?

no in the code

CoalHelmet = new ItemCoalHelmet(23252, armorCoal, addArmor("Coal"), 0).setUnlocalizedName("Coal Helmet").setCreativeTab(CreativeTabs.tabCombat);

the 3rd parameter was ModLoader.addArmor("Coal");

but how can i do it without that the 3rd parameter is an int

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.