LeiteDesnatado Posted February 8, 2021 Posted February 8, 2021 Why is my helmet armor model isn't loading properly?, I'm almost sure it's my model class because a model I downloaded worked fine package com.leitedesnatado.examplemod.client.model; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.client.renderer.model.ModelRenderer; import net.minecraft.entity.LivingEntity; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.Dist; @OnlyIn(Dist.CLIENT) public class ModelGoggles extends BipedModel<LivingEntity> { private ModelRenderer armorHead; public ModelGoggles(float modelSize) { super(modelSize, 0.0F, 64, 64); armorHead = new ModelRenderer(this); armorHead.setRotationPoint(0.0F, 0.0F, 0.0F); armorHead.setTextureOffset(11, 0).addBox(-4.0F, -5.0F, -5.0F, 8.0F, 3.0F, 1.0F, 0.0F); armorHead.setTextureOffset(0, 10).addBox(4.0F, -4.0F, -5.0F, 1.0F, 1.0F, 9.0F, 0.0F); armorHead.setTextureOffset(0, 0).addBox(-5.0F, -4.0F, -5.0F, 1.0F, 1.0F, 9.0F, 0.0F); armorHead.setTextureOffset(11, 11).addBox(-5.0F, -4.0F, 4.0F, 10.0F, 1.0F, 1.0F, 0.0F); bipedHead.addChild(armorHead); } public void setRotationAngles(LivingEntity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { super.setRotationAngles(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); } @Override public void render(MatrixStack matrixStackIn, IVertexBuilder bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) { super.render(matrixStackIn, bufferIn, packedLightIn, packedOverlayIn, red, green, blue, alpha); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } Quote
Recommended Posts
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.