Jump to content

Recommended Posts

Posted

You're calling a method (

RenderingRegistry.addNewArmourRendererPrefix

) that references a client-only class (

RenderBiped

) on the server. All rendering-related stuff should only be registered from your client proxy, that way it's only called on the client.

 

In your base proxy type, create a method called something like

init

or

registerRenderers

(the name doesn't really matter) and then override it in your client proxy to call

RenderingRegistry.addNewArmourRendererPrefix

and any other client-only stuff that should be called in the same phase. Call this method on your proxy instance from your

FMLInitializationEvent

method (i.e.

MainRegistry.load

).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Thanks man, this worked! Actually, all I did was remove the renderingregistry method and the server works like a charm now! (Of course, I included those registerRenderer methods in the proxies but idk what they do, if you could tell me I'd really appreciate it. Thanks anyway!

Posted

Thanks man, this worked! Actually, all I did was remove the renderingregistry method and the server works like a charm now! (Of course, I included those registerRenderer methods in the proxies but idk what they do, if you could tell me I'd really appreciate it. Thanks anyway!

 

RenderingRegistry.addNewArmourRendererPrefix

is an alternative to overriding

Item#getArmorTexture

. You can call it with the prefix of your textures and pass the returned

int

to the

ItemArmor

constructor so it's assigned to the

ItemArmor#renderIndex

field, the prefix will then be used for your item's armour texture. Look at

RenderBiped.getArmorResource

to see how it's used.

 

I didn't know about this beforehand, I just used my IDE to look at the source of

RenderingRegistry.addNewArmourRendererPrefix

and find usages of the array it populates.

 

You're better off overriding

Item#getArmorTexture

instead of using

RenderingRegistry.addNewArmourRendererPrefix

, since the former allows you to specify the resource domain of your textures instead of requiring them to be in the

minecraft

domain.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.