Search in sources :

Example 1 with AbstractChestHorse

use of net.minecraft.entity.passive.AbstractChestHorse in project Wizardry by TeamWizardry.

the class ModelUnicorn method render.

@Override
@SuppressWarnings("unused")
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    AbstractHorse abstracthorse = (AbstractHorse) entityIn;
    float f = abstracthorse.getGrassEatingAmount(0.0F);
    boolean flag = abstracthorse.isChild();
    boolean flag1 = !flag && abstracthorse.isHorseSaddled();
    boolean flag2 = abstracthorse instanceof AbstractChestHorse;
    float f1 = abstracthorse.getHorseSize();
    boolean flag4 = abstracthorse.isBeingRidden();
    if (flag1) {
        this.horseFaceRopes.render(scale);
        this.horseSaddleBottom.render(scale);
        this.horseSaddleFront.render(scale);
        this.horseSaddleBack.render(scale);
        this.horseLeftSaddleRope.render(scale);
        this.horseLeftSaddleMetal.render(scale);
        this.horseRightSaddleRope.render(scale);
        this.horseRightSaddleMetal.render(scale);
        this.horseLeftFaceMetal.render(scale);
        this.horseRightFaceMetal.render(scale);
        if (flag4) {
            this.horseLeftRein.render(scale);
            this.horseRightRein.render(scale);
        }
    }
    if (!flag) {
        GlStateManager.pushMatrix();
        GlStateManager.scale(f1, 0.5F + f1 * 0.5F, f1);
        GlStateManager.translate(0.0F, 0.95F * (1.0F - f1), 0.0F);
    }
    this.backLeftLeg.render(scale);
    this.backLeftShin.render(scale);
    this.backLeftHoof.render(scale);
    this.backRightLeg.render(scale);
    this.backRightShin.render(scale);
    this.backRightHoof.render(scale);
    this.frontLeftLeg.render(scale);
    this.frontLeftShin.render(scale);
    this.frontLeftHoof.render(scale);
    this.frontRightLeg.render(scale);
    this.frontRightShin.render(scale);
    this.frontRightHoof.render(scale);
    if (!flag) {
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.scale(f1, f1, f1);
        GlStateManager.translate(0.0F, 1.35F * (1.0F - f1), 0.0F);
    }
    this.body.render(scale);
    this.tailBase.render(scale);
    this.tailMiddle.render(scale);
    this.tailTip.render(scale);
    this.neck.render(scale);
    this.mane.render(scale);
    if (!flag) {
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        float f2 = 0.5F + f1 * f1 * 0.5F;
        GlStateManager.scale(f2, f2, f2);
        if (f <= 0.0F) {
            GlStateManager.translate(0.0F, 1.35F * (1.0F - f1), 0.0F);
        } else {
            GlStateManager.translate(0.0F, 0.9F * (1.0F - f1) * f + 1.35F * (1.0F - f1) * (1.0F - f), 0.15F * (1.0F - f1) * f);
        }
    }
    this.horseLeftEar.render(scale);
    this.horseRightEar.render(scale);
    this.head.render(scale);
    this.horn.render(scale);
    if (!flag) {
        GlStateManager.popMatrix();
    }
}
Also used : AbstractHorse(net.minecraft.entity.passive.AbstractHorse) AbstractChestHorse(net.minecraft.entity.passive.AbstractChestHorse)

Aggregations

AbstractChestHorse (net.minecraft.entity.passive.AbstractChestHorse)1 AbstractHorse (net.minecraft.entity.passive.AbstractHorse)1