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.

 

 

  Reveal hidden contents

 

 

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)

  Quote

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



×
×
  • Create New...

Important Information

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