package com.zivilon.cinder_loe.client.model;


import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

/**
 * Vertical Weapon rack - Cleric_red
 * Created using Tabula 4.1.1
 */
public class Modelverticalweaponrack extends ModelBase {
    public ModelRenderer Post;
    public ModelRenderer Plate;
    public ModelRenderer Post_1;
    public ModelRenderer Base;
    public ModelRenderer HolderBottom;
    public ModelRenderer HolderBottom_1;
    public ModelRenderer HolderBottom_2;
    public ModelRenderer HolderTop;
    public ModelRenderer HolderTop_1;
    public ModelRenderer HolderTop_2;
    public boolean onWall = true;

    public Modelverticalweaponrack() {
        this.textureWidth = 64;
        this.textureHeight = 32;
        this.HolderBottom_2 = new ModelRenderer(this, 0, 17);
        this.HolderBottom_2.setRotationPoint(-1.0F, 20.0F, 2.0F);
        this.HolderBottom_2.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
        this.setRotateAngle(HolderBottom_2, 0.0F, 1.5707963267948966F, 0.0F);
        this.Base = new ModelRenderer(this, 0, 0);
        this.Base.setRotationPoint(-8.0F, 10.0F, 2.5F);
        this.Base.addBox(0.0F, 0.0F, 0.0F, 5, 14, 2, 0.0F);
        this.setRotateAngle(Base, 0.0F, 1.5707963267948966F, 0.0F);
        this.HolderTop_1 = new ModelRenderer(this, 0, 17);
        this.HolderTop_1.setRotationPoint(-1.0F, 12.0F, -1.0F);
        this.HolderTop_1.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
        this.setRotateAngle(HolderTop_1, 0.0F, 1.5707963267948966F, 0.0F);
        this.HolderTop = new ModelRenderer(this, 5, 17);
        this.HolderTop.setRotationPoint(-1.0F, 12.0F, 2.0F);
        this.HolderTop.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
        this.setRotateAngle(HolderTop, 0.0F, 1.5707963267948966F, 0.0F);
        this.Post_1 = new ModelRenderer(this, 14, 0);
        this.Post_1.setRotationPoint(-6.0F, 20.0F, 1.0F);
        this.Post_1.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
        this.setRotateAngle(Post_1, 0.0F, 1.5707963267948966F, 0.0F);
        this.Plate = new ModelRenderer(this, 24, 0);
        this.Plate.setRotationPoint(-3.0F, 10.0F, 1.5F);
        this.Plate.addBox(0.0F, 0.0F, 0.0F, 3, 14, 1, 0.0F);
        this.setRotateAngle(Plate, 0.0F, 1.5707963267948966F, 0.0F);
        this.HolderTop_2 = new ModelRenderer(this, 0, 17);
        this.HolderTop_2.setRotationPoint(-2.0F, 12.0F, 2.0F);
        this.HolderTop_2.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
        this.setRotateAngle(HolderTop_2, 0.0F, 1.5707963267948966F, 0.0F);
        this.HolderBottom = new ModelRenderer(this, 5, 17);
        this.HolderBottom.setRotationPoint(-1.0F, 20.0F, -1.0F);
        this.HolderBottom.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
        this.setRotateAngle(HolderBottom, 0.0F, 1.5707963267948966F, 0.0F);
        this.HolderBottom_1 = new ModelRenderer(this, 0, 17);
        this.HolderBottom_1.setRotationPoint(-2.0F, 20.0F, 2.0F);
        this.HolderBottom_1.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
        this.setRotateAngle(HolderBottom_1, 0.0F, 1.5707963267948966F, 0.0F);
        this.Post = new ModelRenderer(this, 14, 0);
        this.Post.setRotationPoint(-6.0F, 12.0F, 1.0F);
        this.Post.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
        this.setRotateAngle(Post, 0.0F, 1.5707963267948966F, 0.0F);
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        this.HolderBottom_2.render(f5);
        this.Base.render(f5);
        this.HolderTop_1.render(f5);
        this.HolderTop.render(f5);
        this.Post_1.render(f5);
        this.Plate.render(f5);
        this.HolderTop_2.render(f5);
        this.HolderBottom.render(f5);
        this.HolderBottom_1.render(f5);
        this.Post.render(f5);
    }

    /**
     * This is a helper function from Tabula to set the rotation of model parts
     */
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}
