ModelSkeletonHead .java

net.minecraft.client.model.ModelSkeletonHead (class, 44 lines): extends ModelBase. members: skeletonHead, setRotationAngles, render. imports: Entity.

net.minecraft.client.modelclass44 linesclientextends ModelBase1.7 KB

API Surface (2)

void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)

Fields & Constants (1)

skeletonHead

Code Graph: Dependencies (3)

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

Full Source

ModelSkeletonHead.java44 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.model;
2
3
import net.minecraft.entity.Entity;
4
5
public class ModelSkeletonHead extends ModelBase
6
{
7
    public ModelRenderer skeletonHead;
8
9
    public ModelSkeletonHead()
10
    {
11
        this(0, 35, 64, 64);
12
    }
13
14
    public ModelSkeletonHead(int p_i1155_1_, int p_i1155_2_, int p_i1155_3_, int p_i1155_4_)
15
    {
16
        this.textureWidth = p_i1155_3_;
17
        this.textureHeight = p_i1155_4_;
18
        this.skeletonHead = new ModelRenderer(this, p_i1155_1_, p_i1155_2_);
19
        this.skeletonHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
20
        this.skeletonHead.setRotationPoint(0.0F, 0.0F, 0.0F);
21
    }
22
23
    /**
24
     * Sets the models various rotation angles then renders the model.
25
     */
26
    public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
27
    {
28
        this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
29
        this.skeletonHead.render(scale);
30
    }
31
32
    /**
33
     * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
34
     * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
35
     * "far" arms and legs can swing at most.
36
     */
37
    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
38
    {
39
        super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
40
        this.skeletonHead.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);
41
        this.skeletonHead.rotateAngleX = headPitch / (180F / (float)Math.PI);
42
    }
43
}
44

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