Jump to content

Any mod that uses methods in ModLoader.class crashes the server


knarf2011

Recommended Posts

I had a mod(http://www.planetminecraft.com/mod/burning-war-mod-forge/) that I made, and was crashing the server, but not the client. The crash report seemed to point to the cause being related to ModLoader.class, possibly missuse of it.

crash report:

 

---- Minecraft Crash Report ----

// My bad.

 

Time: 2/17/13 9:03 PM

Description: Exception in server tick loop

 

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

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

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

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

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

at ho.c(DedicatedServer.java:135)

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

at fy.run(SourceFile:849)

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

at BurningWarMod.common.mod_BurningWarMod.load(mod_BurningWarMod.java:159)

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

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

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

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

at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:487)

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

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

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

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

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

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

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

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

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

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

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:86)

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

... 5 more

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.4.7

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_03, Oracle Corporation

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

Memory: 1000901784 bytes (954 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.26a FML v4.7.32.553 Minecraft Forge 6.6.1.527 4 mods loaded, 4 mods active

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

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

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

BurningWarMod [burning War Mod] (Burning War Mod 1.1.1.zip) Unloaded->Constructed->Pre-initialized->Errored

Profiler Position: N/A (disabled)

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

Type: Dedicated Server (map_server.txt)

 

I tried re-wording the code in my main mod class file, but nothing seemed to work. So I tried the same thing with a popular mod that uses ModLoader.class (http://www.planetminecraft.com/mod/146gem-mod-new-armor-new-tools-new-food-new-blocks/), and got a similar crash report, this time when apparently using ModLoader.class to add acheivments.

crash report:

 

---- Minecraft Crash Report ----

// I let you down. Sorry :(

 

Time: 2/17/13 9:44 PM

Description: Exception in server tick loop

 

java.lang.NoSuchMethodError: jg.i()Ljava/lang/String;

at ModLoader.addAchievementDesc(ModLoader.java:97)

at files.mod_AchievementSoulBlock.<init>(mod_AchievementSoulBlock.java:15)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

at java.lang.Class.newInstance0(Class.java:372)

at java.lang.Class.newInstance(Class.java:325)

at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:501)

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

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

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

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

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

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

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

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

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

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

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:86)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:351)

at ho.c(DedicatedServer.java:64)

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

at fy.run(SourceFile:849)

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.4.7

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_03, Oracle Corporation

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

Memory: 1004977936 bytes (958 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.26a FML v4.7.32.553 Minecraft Forge 6.6.1.527 66 mods loaded, 66 mods active

mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge [Minecraft Forge] (coremods) Unloaded->Constructed

mod_AchievementSoulBlock [mod_AchievementSoulBlock] (GemMod15.zip) Unloaded

mod_AchievementSoulChunk [mod_AchievementSoulChunk] (GemMod15.zip) Unloaded

mod_AchievementSoulShard [mod_AchievementSoulShard] (GemMod15.zip) Unloaded

mod_Armor [mod_Armor] (GemMod15.zip) Unloaded

mod_Armor2 [mod_Armor2] (GemMod15.zip) Unloaded

mod_Armor3 [mod_Armor3] (GemMod15.zip) Unloaded

mod_Armor4 [mod_Armor4] (GemMod15.zip) Unloaded

mod_Armor5 [mod_Armor5] (GemMod15.zip) Unloaded

mod_Beast [mod_Beast] (GemMod15.zip) Unloaded

mod_Biome2 [mod_Biome2] (GemMod15.zip) Unloaded

mod_Biome3 [mod_Biome3] (GemMod15.zip) Unloaded

mod_Block2 [mod_Block2] (GemMod15.zip) Unloaded

mod_Block3 [mod_Block3] (GemMod15.zip) Unloaded

mod_Block4 [mod_Block4] (GemMod15.zip) Unloaded

mod_Block5 [mod_Block5] (GemMod15.zip) Unloaded

mod_Block6 [mod_Block6] (GemMod15.zip) Unloaded

mod_Block7 [mod_Block7] (GemMod15.zip) Unloaded

mod_Block8 [mod_Block8] (GemMod15.zip) Unloaded

mod_Block9 [mod_Block9] (GemMod15.zip) Unloaded

mod_Boss1 [mod_Boss1] (GemMod15.zip) Unloaded

mod_Food [mod_Food] (GemMod15.zip) Unloaded

mod_Food2 [mod_Food2] (GemMod15.zip) Unloaded

mod_Fuel [mod_Fuel] (GemMod15.zip) Unloaded

mod_Item10 [mod_Item10] (GemMod15.zip) Unloaded

mod_Item11 [mod_Item11] (GemMod15.zip) Unloaded

mod_Item12 [mod_Item12] (GemMod15.zip) Unloaded

mod_Item13 [mod_Item13] (GemMod15.zip) Unloaded

mod_Item14 [mod_Item14] (GemMod15.zip) Unloaded

mod_Item15 [mod_Item15] (GemMod15.zip) Unloaded

mod_Item16 [mod_Item16] (GemMod15.zip) Unloaded

mod_Item17 [mod_Item17] (GemMod15.zip) Unloaded

mod_Item18 [mod_Item18] (GemMod15.zip) Unloaded

mod_Item19 [mod_Item19] (GemMod15.zip) Unloaded

mod_Item2 [mod_Item2] (GemMod15.zip) Unloaded

mod_Item20 [mod_Item20] (GemMod15.zip) Unloaded

mod_Item3 [mod_Item3] (GemMod15.zip) Unloaded

mod_Item4 [mod_Item4] (GemMod15.zip) Unloaded

mod_Item5 [mod_Item5] (GemMod15.zip) Unloaded

mod_Item6 [mod_Item6] (GemMod15.zip) Unloaded

mod_Item7 [mod_Item7] (GemMod15.zip) Unloaded

mod_Item9 [mod_Item9] (GemMod15.zip) Unloaded

 

 

I used the most recent version of forge to write my mod, to test my mod before compiling, to run the server, and to run the client. The other mod did cause the client to crash, but did not output any file to tell me why.

Link to comment
Share on other sites

There are mods out there that are written for ModLoader specifically, these mods usually do not work when you put them on the server as ModLoader does not work on the server, and a modder has to take special care not to invoke any client specific code on the server.

Seems that the mods you've mentioned have not taken that care and are not dedi server compatible.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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

    • So I saw that mixin is shipped as a library with forge, but is it available for 1.7.10 ?  
    • So I've read the EULA, and lets be straight...     If I split my modpack(of my mods, yeah I'm nuts) into several(many) individual mods(like just one boss) with minor additions(plus not working together), then have a complete/modpack version on patreon/onlyfans having each addon work together... Would people buy my idea?
    • German A1 – C1, TestDAF, Goethe B1, B2, C1, C2, valid GOETHE certificate German A1 – C1, TestDAF, Goethe B1, B2, C1, C2, valid GOETHE certificate(+27(838-80-8170
    • Done, it still crashed. New log https://paste.ee/p/kYv6e
    • I am migrating a mod from 1.16.5 to 1.20.2 The version for 1.16.5 can be found here https://github.com/beothorn/automataCraft For the block called automata_start, it uses TileEntities and has blockstates, model/block and textures on json files. This is currently working fine on 1.16.5 https://github.com/beothorn/automataCraft/tree/master/src/main/resources/assets/automata For 1.20.2 I migrated the logic from TileEntities to BlockEntity. The mod is working fine. All blocks and Items are working with the correct textures except for the textures for each state of the automata_start block. No changes where made to the json files. This is the branch I am working on (there were some refactorings, but all is basically the same): https://github.com/beothorn/automataCraft/tree/1_20/src/main/resources/assets/automata The only difference I can think that may be related is that i had to implement createBlockStateDefinition on the BaseEntityBlock: https://github.com/beothorn/automataCraft/blob/1_20/src/main/java/br/com/isageek/automata/automata/AutomataStartBlock.java#L43 This is driving me crazy. I know the jsons are being loaded as I put a breakpoint at `net.minecraft.client.resources.model.ModelBakery#loadModel` and I can see BlockModelDefinition.fromJsonElement being called with automata_start. I also printed the state from the arguments of the tick function call and they look correct (https://github.com/beothorn/automataCraft/blob/1_20/src/main/java/br/com/isageek/automata/automata/Ticker.java#L32 ): blockState Block{automata:automata_start}[state=loadreplaceables] In game, all I see is the no textures. I think it is weird it is not the "missing texture" texture so I think it may be related to the material, but I had no success tweaking it (https://github.com/beothorn/automataCraft/blob/1_20/src/main/java/br/com/isageek/automata/automata/AutomataStartBlock.java#L37).   public static final Property<AutomataStartState> state = EnumProperty.create("state", AutomataStartState.class); private final AtomicReference<RegistryObject<BlockEntityType<?>>> blockEntityType; private final Map<String, RegistryObject<Block>> registeredBlocks; public AutomataStartBlock( final AtomicReference<RegistryObject<BlockEntityType<?>>> blockEntityType, final Map<String, RegistryObject<Block>> registeredBlocks ) { super(BlockBehaviour.Properties.of().mapColor(MapColor.STONE).strength(1.5F, 6.0F)); this.blockEntityType = blockEntityType; this.registeredBlocks = registeredBlocks; this.registerDefaultState(this.getStateDefinition().any().setValue(state, AutomataStartState.LOAD_REPLACEABLES)); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateBuilder) { stateBuilder.add(state); }     So my cry for help is, anyone has any ideas? Is there a way to easily debug this, for example somewhere where I can list the textures for a given state, or make sure this is loaded?   Thanks in advance for the hints
  • Topics

×
×
  • Create New...

Important Information

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