McJty / YouTubeModdingTutorial

The source code for McJty's YouTube modding tutorial
MIT License
31 stars 7 forks source link

I cant get the mod to run on a server #2

Closed vibes81 closed 5 years ago

vibes81 commented 5 years ago

I've tried several times to build and run the mod on a server but it crashes on startup

---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 16/12/18 15:40
Description: Exception in server tick loop

java.lang.NoClassDefFoundError: net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer
    at mcjty.mymod.ModBlocks.register(ModBlocks.java:71)
    at mcjty.mymod.proxy.CommonProxy.registerBlocks(CommonProxy.java:78)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_CommonProxy_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:775)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628)
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 13 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@109f5dd8 from coremod FMLCorePlugin
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)
    at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
    ... 15 more
Caused by: java.lang.RuntimeException: Attempted to load class bwy for invalid side SERVER
    at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)
    ... 17 more
McJty commented 5 years ago

Can you show the code of ModBlocks? Because it seems you are not using the standard ModBlocks

vibes81 commented 5 years ago

Thats the thing tho, I cloned the tutorial code as a last ditch to see if Id missed anything but I did find in blockGenerator this

@Override public void initModel() { super.initModel(); ClientRegistry.bindTileEntitySpecialRenderer(TileGenerator.class, new AnimationTESR<>()); }

Does it need @SideOnly(Side.CLIENT) above it?

McJty commented 5 years ago

Oh right. I might have to fix that