ModelArmorStandArmor .java

net.minecraft.client.model.ModelArmorStandArmor (class, 58 lines): extends ModelBiped. members: setRotationAngles. imports: EntityArmorStand, Entity.

net.minecraft.client.modelclass58 linesclientextends ModelBiped3.2 KB

API Surface (1)

void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ModelArmorStandArmor.java58 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.model;
2
3
import net.minecraft.entity.Entity;
4
import net.minecraft.entity.item.EntityArmorStand;
5
6
public class ModelArmorStandArmor extends ModelBiped
7
{
8
    public ModelArmorStandArmor()
9
    {
10
        this(0.0F);
11
    }
12
13
    public ModelArmorStandArmor(float modelSize)
14
    {
15
        this(modelSize, 64, 32);
16
    }
17
18
    protected ModelArmorStandArmor(float modelSize, int textureWidthIn, int textureHeightIn)
19
    {
20
        super(modelSize, 0.0F, textureWidthIn, textureHeightIn);
21
    }
22
23
    /**
24
     * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
25
     * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
26
     * "far" arms and legs can swing at most.
27
     */
28
    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
29
    {
30
        if (entityIn instanceof EntityArmorStand)
31
        {
32
            EntityArmorStand entityarmorstand = (EntityArmorStand)entityIn;
33
            this.bipedHead.rotateAngleX = 0.017453292F * entityarmorstand.getHeadRotation().getX();
34
            this.bipedHead.rotateAngleY = 0.017453292F * entityarmorstand.getHeadRotation().getY();
35
            this.bipedHead.rotateAngleZ = 0.017453292F * entityarmorstand.getHeadRotation().getZ();
36
            this.bipedHead.setRotationPoint(0.0F, 1.0F, 0.0F);
37
            this.bipedBody.rotateAngleX = 0.017453292F * entityarmorstand.getBodyRotation().getX();
38
            this.bipedBody.rotateAngleY = 0.017453292F * entityarmorstand.getBodyRotation().getY();
39
            this.bipedBody.rotateAngleZ = 0.017453292F * entityarmorstand.getBodyRotation().getZ();
40
            this.bipedLeftArm.rotateAngleX = 0.017453292F * entityarmorstand.getLeftArmRotation().getX();
41
            this.bipedLeftArm.rotateAngleY = 0.017453292F * entityarmorstand.getLeftArmRotation().getY();
42
            this.bipedLeftArm.rotateAngleZ = 0.017453292F * entityarmorstand.getLeftArmRotation().getZ();
43
            this.bipedRightArm.rotateAngleX = 0.017453292F * entityarmorstand.getRightArmRotation().getX();
44
            this.bipedRightArm.rotateAngleY = 0.017453292F * entityarmorstand.getRightArmRotation().getY();
45
            this.bipedRightArm.rotateAngleZ = 0.017453292F * entityarmorstand.getRightArmRotation().getZ();
46
            this.bipedLeftLeg.rotateAngleX = 0.017453292F * entityarmorstand.getLeftLegRotation().getX();
47
            this.bipedLeftLeg.rotateAngleY = 0.017453292F * entityarmorstand.getLeftLegRotation().getY();
48
            this.bipedLeftLeg.rotateAngleZ = 0.017453292F * entityarmorstand.getLeftLegRotation().getZ();
49
            this.bipedLeftLeg.setRotationPoint(1.9F, 11.0F, 0.0F);
50
            this.bipedRightLeg.rotateAngleX = 0.017453292F * entityarmorstand.getRightLegRotation().getX();
51
            this.bipedRightLeg.rotateAngleY = 0.017453292F * entityarmorstand.getRightLegRotation().getY();
52
            this.bipedRightLeg.rotateAngleZ = 0.017453292F * entityarmorstand.getRightLegRotation().getZ();
53
            this.bipedRightLeg.setRotationPoint(-1.9F, 11.0F, 0.0F);
54
            copyModelAngles(this.bipedHead, this.bipedHeadwear);
55
        }
56
    }
57
}
58

Deobfuscated MCP 1.8.9 source of ModelArmorStandArmor from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/model/ModelArmorStandArmor.java), stored verbatim.