Posted May 10, 201312 yr Hey guys! I was looking for a custom renderer for my armor and I found this method in the Item class : public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot){ return null; } To do that you need to create a new class that extends ModelBiped : public class MyCustomArmorRender extends ModelBiped{ public MyCustomArmorRender(){ //load the normal player model from ModelBiped super(); } //self explaining public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7){ } } .....and thanks to the 'Advanced model loader' in Forge you can render a wavefront object for your armor. If you are done with your render you can bind the texture for the model with : public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer){ } in the Item class. Put 'return new MyCustomArmorRender();' into the 'getArmorModel' method. (I hope it was not pure luck that it worked for me, correct me if I'm wrong)
June 15, 201312 yr I tried to reproduce this by myself. But I'm running into some errors, so if you could specify them a little more I'd be thankful. 1. Do I have to make my Items class extend Item or ItemArmor (ran in some errors with the renderIndex while having it extend ItemArmor)? You obviously can't wear an Item so I tried it with the isValidArmor() method (it worked). 2. In the render() method in the ModelBiped extending class, do you render the ModelBiped model AND your model (btw I'm using normal techne made models, so I'm loading them in the constructor too) or something else? At the moment nothing renders when I put on my item (or at least is invisible ^^) but I really hope that you can clarify this because it sounds very good to me at the moment. And no my name is not inspired by DBZ ^^
June 15, 201312 yr Put this in the Tutorials! BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 25, 201312 yr Sir could you explain it a little further it wont work on me and what do you mean by that Tutorial button ?
June 25, 201312 yr Sir could you explain it a little further it wont work on me and what do you mean by that Tutorial button ? We have a wiki for tutorials. This board is for people who need help. We appreciate the tutorial, but this is not the place for it. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
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.