Jump to content

[1.7.10] Server - No Class Def Found Error [SOLVED]


Recommended Posts

Posted

Used the tutorial provided by MrCaracal and some snooping around in other mods to figure out proxies. In short: entities went in the common proxy, renderer went in the client proxy. Shocker!

 

-------- SOLVED ---------

 

Yup, can't get my mod to work on a server.

 

 

---- Minecraft Crash Report ----

// Surprise! Haha. Well, this is awkward.

 

Time: 12/11/14 11:37 AM

Description: Exception in server tick loop

 

java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/Render

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420)

at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

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

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

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

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

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

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.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

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

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

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

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

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

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

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

at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

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(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 29 more

Caused by: java.lang.NullPointerException

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_55, Oracle Corporation

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

Memory: 1926384864 bytes (1837 MB) / 2058878976 bytes (1963 MB) up to 2058878976 bytes (1963 MB)

JVM Flags: 2 total; -Xms2G -Xmx2G

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.85.1232 Minecraft Forge 10.13.2.1232 40 mods loaded, 40 mods active

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

FML{7.10.85.1232} [Forge Mod Loader] (forge.jar) Unloaded->Constructed

Forge{10.13.2.1232} [Minecraft Forge] (forge.jar) Unloaded->Constructed

appliedenergistics2-core{rv1-stable-1} [AppliedEnergistics2 Core] (minecraft.jar) Unloaded->Constructed

CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed

ThaumicTinkerer-preloader{0.1} [Thaumic Tinkerer Core] (minecraft.jar) Unloaded->Constructed

doggytalents{v1.8.2a} [Doggy Talents] ([1.7.10] Doggy Talents - v1.8.2a.zip) Unloaded->Constructed

bspkrsCore{6.15} [bspkrsCore] ([1.7.10]bspkrsCore-universal-6.15.jar) Unloaded->Constructed

Treecapitator{1.7.10} [Treecapitator] ([1.7.10]Treecapitator-universal-2.0.4.jar) Unloaded->Constructed

AppleCore{1.0.1} [AppleCore] (AppleCore-mc1.7.10-1.0.1.jar) Unloaded->Constructed

appliedenergistics2{rv1-stable-1} [Applied Energistics 2] (appliedenergistics2-rv1-stable-1.jar) Unloaded->Constructed

BiomesOPlenty{2.1.0} [biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1019-universal.jar) Unloaded->Constructed

Baubles{1.0.1.10} [baubles] (Baubles-1.7.10-1.0.1.10.jar) Unloaded->Constructed

Thaumcraft{4.2.1.4} [Thaumcraft] (Thaumcraft-1.7.10-4.2.1.4.jar) Unloaded->Constructed

Botania{r1.3-141} [botania] (Botania r1.3-141.jar) Unloaded->Constructed

BuildCraft|Core{6.1.8} [buildCraft] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Builders{6.1.8} [bC Builders] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Energy{6.1.8} [bC Energy] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Factory{6.1.8} [bC Factory] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Transport{6.1.8} [bC Transport] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Silicon{6.1.8} [bC Silicon] (buildcraft-6.1.8.jar) Unloaded->Constructed

CarpentersBlocks{3.3.3} [Carpenter's Blocks] (Carpenter's Blocks v3.3.3 - MC 1.7.10.jar) Unloaded->Constructed

ChickenChunks{1.3.4.14} [ChickenChunks] (ChickenChunks-1.7.10-1.3.4.14-universal (1).jar) Unloaded->Constructed

clockworkphase{1.7.10_1.0a} [Clockwork Phase] (clockworkphase-1.7.10_1.0a.jar) Unloaded->Constructed

craftguide{1.6.8.1} [CraftGuide] (CraftGuide-1.6.8.1.zip) Unloaded->Constructed

IC2{2.2.654-experimental} [industrialCraft 2] (industrialcraft-2-2.2.654-experimental.jar) Unloaded->Constructed

EMT{2.0.0Alpha4} [Electro-Magic Tools] (ElectroMagicTools-1.7.10-2.0.0Alpha-28.jar) Unloaded->Constructed

eplus{3.0.2-d} [Enchanting Plus] (EnchantingPlus-1.7.10-3.0.2-d.jar) Unloaded->Constructed

EnderStorage{1.4.5.26} [EnderStorage] (EnderStorage-1.7.10-1.4.5.26-universal.jar) Unloaded->Constructed

ExtraUtilities{1.2.0} [Extra Utilities] (extrautilities-1.2.0.jar) Unloaded->Constructed

FastCraft{1.9} [FastCraft] (fastcraft-1.9.jar) Unloaded->Constructed

harvestcraft{1.7.10b} [Pam's HarvestCraft] (Pam's HarvestCraft 1.7.10c.jar) Unloaded->Constructed

HungerOverhaul{1.7.10-beta.2.jenkins30} [Hunger Overhaul] (HungerOverhaul-1.7.10-beta.2.jar) Unloaded->Constructed

LivelyAnimals{0.0001} [Lively Animals] (LivelyAnimals.jar) Unloaded

magicalcrops{1.7.2 - 0.1 ALPHA} [Magical Crops] (magicalcrops-1.7.10_0.1.jar) Unloaded

SpiceOfLife{1.2.2} [The Spice of Life] (SpiceOfLife-mc1.7.10-1.2.2.jar) Unloaded

StorageDrawers{1.2.0} [storage Drawers] (StorageDrawers-1.7.10-1.2.0.jar) Unloaded

thaumicenergistics{0.8.7b} [Thaumic Energistics] (thaumicenergistics-0.8.7b.jar) Unloaded

ThaumicTinkerer{unspecified} [Thaumic Tinkerer] (ThaumicTinkerer-2.5-1.7.10-161.jar) Unloaded

YALSM{2.1.3} [Yet Another Leather Smelting Mod] (yalsm-2.1.3.jar) Unloaded

AE2 Version: stable rv1-stable-1 for Forge 10.13.0.1187

Profiler Position: N/A (disabled)

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

Type: Dedicated Server (map_server.txt)

 

 

I assume it probably has something to do with rendering being client-side only, but I'm not sure how to account for that. I tried using the @ClientSide Only tag as a quick, temporary fix, but that didn't do it either.

 

... inexplicably, it does work on Single player but the back legs don't seem to render. I figured the problems were probably one in the same though.

Posted

1. Provide code

2. Server has no rendering, Minecraft and many other classes.

3. You need to use proxy and Side.CLIENT or world.isRemote (depends)

1.7.10 is no longer supported by forge, you are on your own.

Posted

You are correct in that this issue is caused by rendering classes being "client-side" only - meaning that the rendering classes don't exist at all on a dedicated server.

 

What you need is a way to ensure that your rendering stuff is only called upon by the Minecraft client. The way this is accomplished is by the use of a proxy class, like Ernio said. You will create two classes with identical method signatures: one that will be loaded for the client, one that will be loaded for the server. If you make your client proxy class inherit from your common proxy class and override the common proxy's methods, you will be able to call methods in your common proxy instance and have them execute one way on the "client" and one way on the "server."

 

This is useful for separating your rendering stuff between "sides". If your rendering stuff is only registered in your client proxy, it will only ever load that stuff on a client. Here's the wiki tutorial on how to write a proxy class -> http://www.minecraftforge.net/wiki/Proxies

 

Attempting to use the @ClientSideOnly or @SideOnly annotations was logical given their names, but not quite what those are meant to be used for. Those annotations simply mean "the following field or method should only exist to the specified side". They can cause problems if one side is expecting that field or method and it is tagged to only "exist" on the other, so they should be used sparingly and only on fields and methods that you know will only be used on one side; one example being IIcon fields and related methods.

Posted

Good news: Got the proxy thing figured out! I'm surprised I was able to do it without any problem.

 

Bad news: ... my pigs are still bipedal. Any ideas for why this is happening?

Posted

How's that? I overrode the original model in the hashmap for entities, so I'm not sure what more I could do.

 

Edit: Well, that is extremely bizarre. I decided to update my mod to .1240, and once I transferred the files over I could see that the back legs didn't actually have a texture. Which is WEIRD because I DID texture them, and they showed up absolutely fine on eclipse. It's only when I moved folders that that showed up.

 

In any case, problems solved!

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

    • @Tsuk1 Also, new note, you can use blockbench to make the custom item model for when it is not on the head.   EDIT: Funny story, I am making a mod similar to yours! Mine is called NorseMC.
    • @Nood_dev Could you send a screenshot of your weapon code? Here is the one I made (for a dagger): The specific UUID does not matter, just that it is the same every time, which is why UUID#randomUUID does not work public class DaggerItem extends TieredItem implements Vanishable { protected static final double REACH_MODIFIER = -1.5D; protected final Multimap<Attribute, AttributeModifier> defaultModifiers; protected final UUID BASE_ATTACK_REACH_UUID = UUID.fromString("6fe75b5c-9d1b-4e83-9eea-a1d5a94e8dd5") public DaggerItem(Tier pTier, int pAttackDamageModifier, float pAttackSpeedModifier, Properties pProperties) { super(pTier, pAttackDamageModifier, pAttackSpeedModifier, pProperties); this.attackDamage = (float) pAttackDamageModifier + pTier.getAttackDamageBonus(); ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder(); builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Weapon modifier", this.attackDamage, AttributeModifier.Operation.ADDITION)); builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Weapon modifier", pAttackSpeedModifier, AttributeModifier.Operation.ADDITION)); // THE ONE YOU WANT: builder.put(ForgeMod.ENTITY_REACH.get(), new AttributeModifier(BASE_ATTACK_REACH_UUID, "Weapon modifier", REACH_MODIFIER, AttributeModifier.Operation.ADDITION)); this.defaultModifiers = builder.build(); } @Override public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot pEquipmentSlot) { return pEquipmentSlot == EquipmentSlot.MAINHAND ? this.defaultModifiers : super.getDefaultAttributeModifiers(pEquipmentSlot); } }
    • https://images.app.goo.gl/1PxFKdxByTgkxvSu6
    • That's what we'll try out. I could never figure out how to recreate the crash, so I'll just have to wait and see.
    • Ok, I updated to the latest version and now the models are visible, the problem now is that the glowing eyes are not rendered nor any texture I render there when using shaders, even using the default Minecraft eyes RenderType, I use entityTranslucent and entityCutout, but it still won't render. Something I noticed when using shaders is that a texture, instead of appearing at the world position, would appear somewhere on the screen, following a curved path, it was strange, I haven't been able to reproduce it again. I thought it could be that since I render the texture in the AFTER ENTITIES stage which is posted after the batches used for entity rendering are finished, maybe that was the reason why the render types were not being drawn correctly, so I tried injecting code before finishing the batches but it still didn't work, plus the model was invisible when using shaders, there was a bug where if I look at the model from above it is visible but if I look at it from below it is invisible. So in summary, models are now visible but glowing eyes and textures are not rendered, that hasn't changed.
  • Topics

×
×
  • Create New...

Important Information

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