ModelHumanoidHead .java

net.minecraft.client.model.ModelHumanoidHead (class, 37 lines): extends ModelSkeletonHead. members: head, setRotationAngles, render. imports: Entity.

net.minecraft.client.modelclass37 linesclientextends ModelSkeletonHead1.5 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)

head

Code Graph: Dependencies (3)

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

Full Source

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

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