Jump to content

Recommended Posts

Posted

Also remove the registerRenders from the common proxy.

 

And why do you think he should do that. You see what Client proxy extends? Yeah, the commonproxy. So one does not simply remove it there as it is needed to be called no matter what side. Just don't have anything inside it in the server side or you will crash and burn.

If my post helped you, please press that "Thank You"-button to show your appreciation.

 

Also if you don't know Java, I would suggest you read the official tutorials by Oracle to get an idea of how to do this. Thanks, and good modding!

 

Also if you haven't, set up a Git repo for your mod not only for convinience but also to make it easier to help you.

Posted

Um, do you need to register the renders in the common proxy? My mod works fine without it.

 

It still needs to be present in here to be called at all. Let's look at his code shall we? See this? That means that the proxy instance has to be Commonproxy or a class that inherits from it, in this case ClientProxy.

 

And now a little lesson in java inheritance. You can only use methods declared in that class/interface whose type is in the method type. Let's for instance have a statement as so:

List<String> stringList = new ArrayList<>();

While the instance stored in stringList is an instance of ArrayList, it can only use the methods in the List interface, however, it still does use the implementations of List's methods that are in ArrayList (well List is a bad example as it is an interface).

 

Same goes with this Commonproxy here. While the proxy field may be populated by an instance of ClientProxy, you can only access the methods declared in the CommonProxy. In this case registerRenderers. So, that metyod has to be present on the common proxy, even if empty, as if it isn't,  the ClientProxy one would not be called.

If my post helped you, please press that "Thank You"-button to show your appreciation.

 

Also if you don't know Java, I would suggest you read the official tutorials by Oracle to get an idea of how to do this. Thanks, and good modding!

 

Also if you haven't, set up a Git repo for your mod not only for convinience but also to make it easier to help you.

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.