MCreator 1.82 issue - server crashes after loading the mod

Published by rafboh on
Status
Duplicate
Issue description

MCreator 1.8.2 , Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 .

Server crashes when loading mod.

[Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception

java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP

        at mod.mcreator.mcreator_spawnmonstersblock.<clinit>(mcreator_spawnmonstersblock.java:33) ~[mcreator_spawnmonstersblock.class:?]

        at mod.mcreator.spawn_monster_tool.<clinit>(spawn_monster_tool.java:98) ~[spawn_monster_tool.class:?]

 

This is very simple mod including a custom block and one procedure. I had the same problem with MCreator 1.8.1. Both mods work when testing in MCreator environment on client side but when installed on the server they make it crashed. Any help ?

Issue comments

Some procedures are single player only. Try to find out which one causes it and try to not use it. We are aware of this issue and are working to eliminate it for all elements and procedures, but this is a lengthy process.

Check this ticket for more info: https://mcreator.net/tracker/issue/40695

Similar issue here with my latest changes to my mod under v1.8.2.  Single player works fine, but once I build the jar and put it on my server it crashes on startup saying that it requires [forge@[14.23.5.2768,14.23.5.2768]] but I'm on build 2795 and that was working fine in MCreator 1.8.1.  Is this latest version including a dependency on only build 2768 or am I possibly doing something wrong?  All the procedures I added in my v1.0.5 work fine for SP & MP.  My 1.0.6 version only introduces new textures for blocks, tools, ores and ingots. No new procedures added or changed.

Here is the crash log: https://pastebin.com/F82FKASC

Not sure if this is related to https://mcreator.net/tracker/issue/40695 as it does not look like the same issue I had then.

Thanks - Steve

@Klemen - I just confirmed that the 1.8.2 release is including a hard dependency for Forge build 2768.  I setup another test server and just installed Forge 2768 and the multiplayer server had no issues starting up with the same mods.  It seems as though the evaluation in the main java class file (tmtmcoresandmore.java) doesn't seem to be validating the "required-after:forge@[14.23.5.2768]" correctly.  it was the only place I found any references to 2768.  My mcmod.info has no listed dependencies, dependants or requiredMods.

@Mod(modid = tmtmcoresandmore.MODID, version = tmtmcoresandmore.VERSION, dependencies = "required-after:forge@[14.23.5.2768]")
public class tmtmcoresandmore implements IFuelHandler, IWorldGenerator {

    public static final String MODID = "tmtmcoresandmore";
    public static final String VERSION = "1.0.6";
    @SidedProxy(clientSide = "mod.mcreator.ClientProxytmtmcoresandmore", serverSide = "mod.mcreator.CommonProxytmtmcoresandmore")
    public static CommonProxytmtmcoresandmore proxy;
    @Instance(MODID)
    public static tmtmcoresandmore instance;
    public static final List<ModElement> elements = new ArrayList<>();

Thanks -Steve

I tried changing the line above to 2795 and removed the value for dependencies and no luck.  Doesn't appear to be in this file that is forcing 2768 being required. Any ideas where I can make a local change to fix it?  Thanks! -Steve