soliddanii
Members-
Posts
4 -
Joined
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
soliddanii's Achievements
Tree Puncher (2/8)
0
Reputation
-
[1.7.10] Help rendering custom .obj armor
soliddanii replied to soliddanii's topic in Modder Support
I'm almost there. With this code: @SideOnly(Side.CLIENT) @Override public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { ModelBiped armorModel = null; if (itemStack != null && itemStack.getItem() instanceof HunterHat) { armorModel = new HunterHatRender(); armorModel.bipedHead.showModel = true; armorModel.bipedHeadwear.showModel = false; armorModel.bipedBody.showModel = false; armorModel.bipedRightArm.showModel = false; armorModel.bipedLeftArm.showModel = false; armorModel.bipedRightLeg.showModel = false; armorModel.bipedLeftLeg.showModel = false; armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); if (entityLiving instanceof EntityPlayer) { armorModel.aimedBow = ((EntityPlayer) entityLiving) .getItemInUseDuration() > 2; armorModel.heldItemRight = ((EntityPlayer) entityLiving) .getCurrentEquippedItem() != null ? 1 : 0; } } return armorModel; } I get this: bipedHead.showModel = true is the only way i can see my model, but i still get the biped head rendered. Also, the model looks f***d up, almost nothing like what i modeled, but thats another problem. -
[1.7.10] Help rendering custom .obj armor
soliddanii replied to soliddanii's topic in Modder Support
help? anyone? :'( :'( -
[1.7.10] Help rendering custom .obj armor
soliddanii replied to soliddanii's topic in Modder Support
Bump? -
I've already searched for a solution to my problem and i'm unable to solve it on my own, probably because i don't have much knowlodege about openGL or rendering. This is my render class: public class HunterHatRender extends ModelBiped { private final IModelCustom hunterHat; public HunterHatRender() { hunterHat = AdvancedModelLoader.loadModel(new ResourceLocation(Main.MODID, "models/hunterHat.obj")); ModelRenderer objModelAttach = new ModelRenderer(this){ @Override public void render(float f) { GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 1.0F, 0.0F); FMLClientHandler.instance().getClient().renderEngine .bindTexture(new ResourceLocation(Main.MODID, "textures/armor/texture.png")); hunterHat.renderAll(); GL11.glPopMatrix(); } }; bipedHead.addChild(objModelAttach); } } An this is what i get: I know the model (hat) isn't finished, is incorrectly placed and doesn't have a texture, but those are other problems i know how to fix. Why does a biped without textures render on top of the normal player? I just wan't to render my hat Thank you.