Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

  • Author

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!

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.

  • Author

Hmm alright. Thanks for the info! Really helpful since I'm also trying to learn Java.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.