Jump to content

Can't install one self-made mod to server


CorruptedVulture

Recommended Posts

I've made my own custom mod, made for 1.12.2 and have been trying to add it to a private server, it's the ONLY mod in the server besides forge, and every time I go back and re-think the code it gives me the exact same error.

The mod works just fine in singleplayer, the server's crash log:

 

---- Minecraft Crash Report ----
// Oops.

Time: 1/5/19 9:05 PM
Description: Exception in server tick loop

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Vanilla Spells 1.12.2 (vanillaspellsmod)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:166)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:159)
    at network.PacketHandler.registerMessages(PacketHandler.java:24)
    at com.vanillaspellsmod.mainRegistry.VanillaSpells.preInit(VanillaSpells.java:52)
    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 net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:624)
    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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
    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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:627)
    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.entity.EntityPlayerSP
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 44 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@5ab9b447 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)
    ... 46 more
Caused by: java.lang.RuntimeException: Attempted to load class bud 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)
    ... 48 more


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

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 889225752 bytes (848 MB) / 1054867456 bytes (1006 MB) up to 3806855168 bytes (3630 MB)
    JVM Flags: 0 total; 
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.5.2795 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State | ID               | Version      | Source                                  | Signature                                |
    |:----- |:---------------- |:------------ |:--------------------------------------- |:---------------------------------------- |
    | LCH   | minecraft        | 1.12.2       | minecraft.jar                           | None                                     |
    | LCH   | mcp              | 9.42         | minecraft.jar                           | None                                     |
    | LCH   | FML              | 8.0.99.99    | forge-1.12.2-14.23.5.2795-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCH   | forge            | 14.23.5.2795 | forge-1.12.2-14.23.5.2795-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCE   | vanillaspellsmod | 0.1          | VanillaSpells0.1(1.12.2).jar            | None                                     |

    Loaded coremods (and transformers): 
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge'
    Type: Dedicated Server (map_server.txt)

It points to a class in my self-made mod, what I think is really important is the part about the packethandler class:

 

package network;

import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;

public class PacketHandler {

    public static SimpleNetworkWrapper INSTANCE;
    
    /*private static int ID = 0;
    
    private static int nextID() {
        return ID++;
    }*/
    
    public static void registerMessages(String channelName) {
        INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(channelName);
        int idx = 0;
    //client -> server
    INSTANCE.registerMessage(PacketToServerUpdateCapability.Handler.class, PacketToServerUpdateCapability.class, idx, Side.SERVER);
        idx++;
    //server -> client
    INSTANCE.registerMessage(PacketToClientUpdatedExperience.Handler.class, PacketToClientUpdatedExperience.class, idx, Side.CLIENT);
        idx++;
    INSTANCE.registerMessage(PacketToClientUpdateCapValue.Handler.class, PacketToClientUpdateCapValue.class, idx, Side.CLIENT);
    
    }

    
    
}
 

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.