Jump to content

Recommended Posts

Posted

my mod works fine with minecraft, how ever when i'm trying to run my mod on a server, but there are problems with the mod initialization. it gives me a crash like this:

 

 

---- Minecraft Crash Report ----

WARNING: coremods are present:
  Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  MicdoodlePlugin (MicdoodleCore-1.12.2-4.0.1.181.jar)
  AppleCore (AppleCore-mc1.12.2-2.2.2.jar)
  GottaGoFastLoader (_gottagofast-1.0_.jar)
  MixinLoaderForge (_ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full_.jar)
Contact their authors BEFORE contacting forge

// But it works on my machine.

Time: 2/8/19 11:36 AM
Description: Exception in server tick loop

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from PlasmaCannon (plasmacannons)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/Render

//these three are my mod
    at com.ice2670.plasmacannon.util.handlers.RenderHandler.registerEntityRenders(RenderHandler.java:16)
    at com.ice2670.plasmacannon.util.handlers.RegistryHandler.preInitRegistries(RegistryHandler.java:53)
    at com.ice2670.plasmacannon.Main.preInit(Main.java:33)

//
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:624)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:218)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:135)
    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(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.entity.Render
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 38 more
Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    ... 40 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: Linux (amd64) version 4.9.0-8-amd64
    Java Version: 1.8.0_201, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 5386153208 bytes (5136 MB) / 6317146112 bytes (6024 MB) up to 6763315200 bytes (6450 MB)
    JVM Flags: 2 total; -Xms6000m -Xmx7256m
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.5.2772 35 mods loaded, 35 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                                |
    |:----- |:------------------- |:------------------------ |:----------------------------------------------------- |:---------------------------------------- |
    | UCH   | minecraft           | 1.12.2                   | minecraft.jar                                         | None                                     |
    | UCH   | mcp                 | 9.42                     | minecraft.jar                                         | None                                     |
    | UCH   | FML                 | 8.0.99.99                | forge-1.12.2-14.23.5.2772-universal.jar               | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | UCH   | forge               | 14.23.5.2772             | forge-1.12.2-14.23.5.2772-universal.jar               | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | UCH   | micdoodlecore       |                          | minecraft.jar                                         | None                                     |
    | UCH   | gottagofast         | 1.0                      | _gottagofast-1.0_.jar                                 | None                                     |
    | UCH   | ic2                 | 2.8.75-ex112             | _industrialcraft-2-2.8.75-ex112_.jar                  | de041f9f6187debbc77034a344134053277aa3b0 |
    | UCH   | omlib               | 3.1.0-0                  | _openmodularturrets-1.12.2-3.1.0-ovwfix_.jar          | None                                     |
    | UCH   | openmodularturrets  | 3.1.0-0                  | _openmodularturrets-1.12.2-3.1.0-ovwfix_.jar          | None                                     |
    | UCEE  | plasmacannons       | 0.1                      | _PlasmaCannons-1.1_.jar                               | None                                     |
    | UC    | valkyrienwarfare    | 0.9_alpha                | _ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full_.jar | None                                     |
    | UC    | jei                 | 4.13.1.222               | jei_1.12.2-4.13.1.222.jar                             | None                                     |
    | UC    | abyssalcraft        | 1.9.4.3                  | AbyssalCraft-1.12.2-1.9.4.3.jar                       | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |
    | UC    | applecore           | 2.2.2                    | AppleCore-mc1.12.2-2.2.2.jar                          | None                                     |
    | UC    | appleskin           | 1.0.9                    | AppleSkin-mc1.12-1.0.9.jar                            | None                                     |
    | UC    | appliedenergistics2 | rv5-stable-2             | appliedenergistics2-rv5-stable-2.jar                  | None                                     |
    | UC    | bibliocraft         | 2.4.5                    | BiblioCraft[v2.4.5][MC1.12.2].jar                     | None                                     |
    | UC    | codechickenlib      | 3.2.2.353                | CodeChickenLib-1.12.2-3.2.2.353-universal.jar         | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
    | UC    | customnpcs          | 1.12                     | CustomNPCs_1.12.2(鸡哥).jar                             | None                                     |
    | UC    | galacticraftcore    | 4.0.1.181                | GalacticraftCore-1.12.2-4.0.1.181.jar                 | None                                     |
    | UC    | galacticraftplanets | 4.0.1.181                | Galacticraft-Planets-1.12.2-4.0.1.181.jar             | None                                     |
    | UC    | mjrlegendslib       | 1.12.2-1.1.6             | MJRLegendsLib-1.12.2-1.1.6.jar                        | b02331787272ec3515ebe63ecdeea0d746653468 |
    | UC    | extraplanets        | 1.12.2-0.4.5             | ExtraPlanets-1.12.2-0.4.5.jar                         | b02331787272ec3515ebe63ecdeea0d746653468 |
    | UC    | gravestone          | 1.0.13                   | GraveStone-1.12-Graves-1.0.13.jar                     | None                                     |
    | UC    | gravestone-extended | 1.2.6                    | GraveStone-1.12.2-Extended-1.2.6.jar                  | None                                     |
    | UC    | inventorytweaks     | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                              | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |
    | UC    | ironchest           | 1.12.2-7.0.34.820        | ironchest-1.12.2-7.0.34.820.jar                       | None                                     |
    | UC    | keepinginventory    | 2.4                      | KeepingInventory-1.12.2-2.4.jar                       | None                                     |
    | UC    | lostcities          | 2.0.12                   | lostcities-1.12-2.0.12.jar                            | None                                     |
    | UC    | mmm                 | 1.0.7                    | mutatedmobs-1.0.7.jar                                 | None                                     |
    | UC    | nei                 | 2.4.2                    | NotEnoughItems-1.12.2-2.4.2.240-universal.jar         | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
    | UC    | harvestcraft        | 1.12.2a                  | Pam's HarvestCraft 1.12.2a.jar                        | None                                     |
    | UC    | ruins               | 17.1                     | Ruins-1.12.2.jar                                      | None                                     |
    | UC    | twilightforest      | 3.3.202                  | twilightforest-1.12.2-3.3.202-universal.jar           | None                                     |
    | UC    | hungeroverhaul      | 1.12.2-1.3.0.jenkins131  | HungerOverhaul-1.12.2-1.3.0.jenkins131.jar            | None                                     |

    Loaded coremods (and transformers): 
Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  invtweaks.forge.asm.ContainerTransformer
MicdoodlePlugin (MicdoodleCore-1.12.2-4.0.1.181.jar)
  micdoodle8.mods.miccore.MicdoodleTransformer
AppleCore (AppleCore-mc1.12.2-2.2.2.jar)
  squeek.applecore.asm.TransformerModuleHandler
GottaGoFastLoader (_gottagofast-1.0_.jar)
  com.thiakil.gottagofast.coremod.GottaGoFastASMTransformer
MixinLoaderForge (_ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full_.jar)
  
    AE2 Version: stable rv5-stable-2 for Forge 14.23.0.2491
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge'
    Type: Dedicated Server (map_server.txt)

Posted (edited)

so it seems net/minecraft/client/renderer/entity/Render does not exist on the server, i suppose i need replace this render class with some different ones

Edited by Ice2670
Posted
this is the RenderHandler class involves render

package com.ice2670.plasmacannon.util.handlers;

import com.ice2670.plasmacannon.entity.EntityLargePlasmaBall;
import com.ice2670.plasmacannon.entity.EntityPlasmaBall;
import com.ice2670.plasmacannon.entity.render.RenderLargePlasmaBall;
import com.ice2670.plasmacannon.entity.render.RenderPlasmaBall;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraftforge.fml.client.registry.IRenderFactory;
import net.minecraftforge.fml.client.registry.RenderingRegistry;

public class RenderHandler
{
    public static void registerEntityRenders()
    {
        RenderingRegistry.registerEntityRenderingHandler(EntityPlasmaBall.class, new IRenderFactory<EntityPlasmaBall>()
        {
            @Override
            public Render<? super EntityPlasmaBall> createRenderFor(RenderManager manager)
            {
                return new RenderPlasmaBall(manager, 1F);
            }
        });

        RenderingRegistry.registerEntityRenderingHandler(EntityLargePlasmaBall.class, new IRenderFactory<EntityLargePlasmaBall>()
        {
            @Override
            public Render<? super EntityLargePlasmaBall> createRenderFor(RenderManager manager)
            {
                return new RenderLargePlasmaBall(manager);
            }
        });
    }
}
Posted (edited)

Rendering stuff is client only. It doesn’t exist on the sever. You need to make sure you aren’t referencing it from any common code

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
4 minutes ago, Cadiboo said:

Rendering stuff is client only. It doesn’t exist on the sever. You need to make sure you aren’t referencing it from any common code

thanks for replying! can i use @Sideonly(Side.Client) to solve this problem?

Posted

Side only removes classes from a side, your error is caused by referencing a class (that has been removed by side only) from common code. Make sure your client registration does not happen in common code

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
3 hours ago, Cadiboo said:

Side only removes classes from a side, your error is caused by referencing a class (that has been removed by side only) from common code. Make sure your client registration does not happen in common code

ok, now i create an empty registerEntityRenders() to common proxy and then override it in client proxy, then i call this method in Main with proxy.registerEntityRenders(), where proxy is Common proxy, would that work?

Posted

What: Not using a “common” proxy

Why: Proxies exist to seperate side-specific code, if there is code that is common, it should not be in a proxy

Consequences: Issues with physical sides, hard to read code. A “common” proxy goes against fundamental OOP and logical concepts

How: Have an interface (usually called IProxy, Proxy, ISidedProxy or IDistributionSidedProxy) and have your client and sever proxies implement this class. Your interface should be in a common package (usually util) and your sever and client proxies should be in their respective packages

 

What: Not using an interface to register models

Why: This interface (commonly called IHasModel) is unnecessary. All items need models and nothing about model registration requires private or protected data.

Consequences: This interface makes you write 4 lines of code in each class and 2+ lines of code in your registry event, when 1 or 2 lines of code could accomplish the exact same thing. It also leads to weird bugs when you forget to make your object implement the interface.

How: Simply register each model in the registry event (1 line of code for each model) or write a loop that does it for you (1 or 2 lines depending on the implementation). For example:

Write out

registerModel(item, meta, variant)

for each item and variant or write a loop like this

for (Item item : allModItemsAndItemBlocks)
	    registerModel(item, meta, variant);

A list of all your items can be acquired in many ways, such as looping over registries and checking domain, keeping your own list, looping over registries and using an instanceof check etc.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.