package com.zivilon.cinder_loe.client.model;
// Made with Blockbench 4.12.4
// Exported for Minecraft version 1.7 - 1.12
// Paste this class into your mod and generate all required imports


import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelDragonHelm extends LOTRModelBiped {
	private final ModelRenderer Hemlet;
	private final ModelRenderer Backer2_r1;
	private final ModelRenderer DragonBottom_r1;
	private final ModelRenderer DragonTop_r1;

	public ModelDragonHelm(float f) {
		super(f);
		textureWidth = 64;
		textureHeight = 64;

		Hemlet = new ModelRenderer(this);
		Hemlet.setRotationPoint(0.0F, -9.0F, 8.0F);
		Hemlet.cubeList.add(new ModelBox(Hemlet, 0, 16, -4.0F, 1.0F, -12.0F, 8, 8, 8, 1.0F));
		Hemlet.cubeList.add(new ModelBox(Hemlet, 57, 25, -3.0F, 1.0F, -2.8F, 3, 6, 0, 0.0F));
		Hemlet.cubeList.add(new ModelBox(Hemlet, 33, 14, 5.2F, 1.0F, -15.0F, 0, 7, 11, 0.0F));
		Hemlet.cubeList.add(new ModelBox(Hemlet, 33, 14, -5.2F, 1.0F, -15.0F, 0, 7, 11, 0.0F));

		Backer2_r1 = new ModelRenderer(this);
		Backer2_r1.setRotationPoint(1.0F, 7.0F, -2.5F);
		setRotationAngle(Backer2_r1, 0.0F, 3.1416F, 0.0F);
		Backer2_r1.cubeList.add(new ModelBox(Backer2_r1, 57, 25, -2.0F, -6.0F, 0.7F, 3, 6, 0, 0.0F));

		DragonBottom_r1 = new ModelRenderer(this);
		DragonBottom_r1.setRotationPoint(1.0F, 10.0F, 0.0F);
		setRotationAngle(DragonBottom_r1, 0.0F, 3.1416F, 0.0F);
		DragonBottom_r1.cubeList.add(new ModelBox(DragonBottom_r1, 23, 45, 1.0F, -10.0F, -1.5F, 0, 10, 7, 0.0F));

		DragonTop_r1 = new ModelRenderer(this);
		DragonTop_r1.setRotationPoint(0.0F, 0.0F, 0.0F);
		setRotationAngle(DragonTop_r1, 0.0F, 3.1416F, 0.0F);
		DragonTop_r1.cubeList.add(new ModelBox(DragonTop_r1, 17, 32, 0.0F, -5.0F, -0.5F, 0, 5, 15, 0.0F));

		// Added biped head to recognize that everything is a child of the head
		this.bipedHead.cubeList.clear();
		bipedHead = new ModelRenderer(this);
		bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
		bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F));

		//Move the children to after setting up biped head for readability, assigned Hemlet to be child of bipedHead
		Hemlet.addChild(Backer2_r1);
		Hemlet.addChild(DragonBottom_r1);
		Hemlet.addChild(DragonTop_r1);
		this.bipedHead.addChild(this.Hemlet);

		//Clear all other body parts from model
		this.bipedHeadwear.cubeList.clear();
		this.bipedBody.cubeList.clear();
		this.bipedRightArm.cubeList.clear();
		this.bipedLeftArm.cubeList.clear();
		this.bipedRightLeg.cubeList.clear();
		this.bipedLeftLeg.cubeList.clear();
	}

	@Override
	public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
		bipedHead.render(f5);
	}

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