Jump to content

Recommended Posts

Posted

Forge put a tantalizing getArmorResource() method into RenderBiped. By honoring the register armor prefix, I had the default producing the exact string I needed for my armor model resource... except that the domain (modid:) was missing from the front. I couldn't for the life of me figure out how to inject modid (or grab the s1 string and concatenate).

 

I gave up and overrode Item.getArmorTexture to produce the entire domain:path string myself. It works, so I am happy with the result, but... It would be so much more elegant if there were a simple way to inject my modid somewhere that Forge's method would be able to finish the job that it starts so nicely.

 

Maybe modid could be passed along to addNewArmourRendererPrefix(), which could append it to a parallel armorDomain[] array pre-seeded with "minecraft" entries for the vanilla armor levels. Then domains would be available when s1 (_default) is formatted.

 

Modders adhering to the <modid>:textures/models/armor/<prefix>_layer_<layer>.png format would be done without overriding getArmorTexture(). Not only that, but modders would be led into creating dynamic armor indices rather than all trying to claim 5 (a collision waiting to happen if/when mods are shared and combined).

 

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

The intention is that you override the function.

So.. No, it's working as intended.

The other system is introduced by FML as a compatibility thing for ModLoader.

As mod loder is now dead, we may end up removing it in favor of telling people to override this function.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.