Jump to content

Recommended Posts

Posted

I made a helmet with a custom model. The helmet correctly renders the texture and custom model portion designed for it, but has some... extra stuff tacked on. 

Picture:

Spoiler

image.png.5f436c03e3481e6dbfd43cc11fcbe915.pngimage.png.586a47715a398ee25f37f42b4a5d8142.png

As the picture shows, the hair plume (mohawk) renders correctly, along with the intended helmet texture. There seems to however be another larger box(that I did not intend) rendered, and it is cutting into the hair plume texture png and rendering parts of said hair plume texture onto the larger box covering the head. Any idea how I can remove it? 

 

my model class:

public class BestialArmorModel extends ModelBiped {

    public ModelRenderer head;
    public ModelRenderer mohawk;

    public BestialArmorModel(float f) {
    	super(f, 0, 64, 32);
    	textureWidth = 64;
    	textureHeight = 32;
    	
        mohawk = new ModelRenderer(this, 32, 0);
        mohawk.setRotationPoint(0F, 0F, 0F);
        mohawk.addBox(-0.5F, -10.5F, -7.8F, 1, 5, 14, 0.0F);
        mohawk.setTextureSize(64, 32);
        mohawk.mirror=true;
        
        head = new ModelRenderer(this, 0, 0);
        head.setRotationPoint(0.0F, 0.0F, 0.0F);
        head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
        head.setTextureSize(64, 32);
        head.mirror=false;
        
        bipedHead.addChild(head);
        bipedHead.addChild(mohawk);
        
        
        
    }

    @Override
    public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { 
    	super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    	setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);
    }

    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
    
    
    
}

 

getArmorModel method in the armor class:

	@SideOnly(Side.CLIENT)
	@Override
	public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) 
	{
		if(!itemStack.isEmpty()) 
		{
			if(itemStack.getItem() instanceof ItemArmor) 
			{
				BestialArmorModel armorModel = new BestialArmorModel(0.25f);
				
				armorModel.bipedHead.showModel = true; 
				
				armorModel.isSneak = _default.isSneak;
				armorModel.isRiding = _default.isRiding;
				armorModel.isChild = _default.isChild;
				armorModel.rightArmPose = _default.rightArmPose;
				armorModel.leftArmPose = _default.leftArmPose;

				return armorModel;
			}
		}
		
		return null;
	}

 

the texture png:

Spoiler

bestial_armor.png.7c24d5e43e92fa321efc18b51bbfc5bf.png

 

Posted

Try changing the colours in parts of the texture to see which part is causing it

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted (edited)

This website might help - You appear to have placed your mohawk texture into an unused-but-reserved part of the texture meant for an extra helmet overlay

https://minecraft.novaskin.me/resourcepacks#default/assets/minecraft/textures/models/armor/iron_layer_1.png

646691344_ScreenShot2018-09-24at4_52_26pm.png.528002460d2a134bc87a22a1bc78bd8a.png

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

I see, thanks for the tip! I feel like the main problem, however, is the fact that there is still an extra overlay present. What segment of the code causes minecraft to render two boxes on top of the players head, hence creating the extra overlay?

Posted
46 minutes ago, Lumby said:

I see, thanks for the tip! I feel like the main problem, however, is the fact that there is still an extra overlay present. What segment of the code causes minecraft to render two boxes on top of the players head, hence creating the extra overlay?

probably render player or renderArmor

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

  • 7 months later...
Posted (edited)

i know this is a bit late but i know the solution to this problem  (for other players that trying the same):

 

BestialArmorModel armorModel = new BestialArmorModel(0.25f);

don't create a new model everytime "getArmorModel" is called 
 

Edited by Oscarita25

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.