ModelLeashKnot .java

net.minecraft.client.model.ModelLeashKnot (class, 44 lines): extends ModelBase. members: field_110723_a, 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)

field_110723_a

Code Graph: Dependencies (3)

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

Full Source

ModelLeashKnot.java44 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.model;
2
3
import net.minecraft.entity.Entity;
4
5
public class ModelLeashKnot extends ModelBase
6
{
7
    public ModelRenderer field_110723_a;
8
9
    public ModelLeashKnot()
10
    {
11
        this(0, 0, 32, 32);
12
    }
13
14
    public ModelLeashKnot(int p_i46365_1_, int p_i46365_2_, int p_i46365_3_, int p_i46365_4_)
15
    {
16
        this.textureWidth = p_i46365_3_;
17
        this.textureHeight = p_i46365_4_;
18
        this.field_110723_a = new ModelRenderer(this, p_i46365_1_, p_i46365_2_);
19
        this.field_110723_a.addBox(-3.0F, -6.0F, -3.0F, 6, 8, 6, 0.0F);
20
        this.field_110723_a.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.field_110723_a.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.field_110723_a.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);
41
        this.field_110723_a.rotateAngleX = headPitch / (180F / (float)Math.PI);
42
    }
43
}
44

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