ModelBoat .java

net.minecraft.client.model.ModelBoat (class, 47 lines): extends ModelBase. members: boatSides, render. imports: Entity.

net.minecraft.client.modelclass47 linesclientextends ModelBase2.0 KB

API Surface (1)

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)

Fields & Constants (1)

boatSides

Code Graph: Dependencies (3)

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

Full Source

ModelBoat.java47 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.model;
2
3
import net.minecraft.entity.Entity;
4
5
public class ModelBoat extends ModelBase
6
{
7
    public ModelRenderer[] boatSides = new ModelRenderer[5];
8
9
    public ModelBoat()
10
    {
11
        this.boatSides[0] = new ModelRenderer(this, 0, 8);
12
        this.boatSides[1] = new ModelRenderer(this, 0, 0);
13
        this.boatSides[2] = new ModelRenderer(this, 0, 0);
14
        this.boatSides[3] = new ModelRenderer(this, 0, 0);
15
        this.boatSides[4] = new ModelRenderer(this, 0, 0);
16
        int i = 24;
17
        int j = 6;
18
        int k = 20;
19
        int l = 4;
20
        this.boatSides[0].addBox((float)(-i / 2), (float)(-k / 2 + 2), -3.0F, i, k - 4, 4, 0.0F);
21
        this.boatSides[0].setRotationPoint(0.0F, (float)l, 0.0F);
22
        this.boatSides[1].addBox((float)(-i / 2 + 2), (float)(-j - 1), -1.0F, i - 4, j, 2, 0.0F);
23
        this.boatSides[1].setRotationPoint((float)(-i / 2 + 1), (float)l, 0.0F);
24
        this.boatSides[2].addBox((float)(-i / 2 + 2), (float)(-j - 1), -1.0F, i - 4, j, 2, 0.0F);
25
        this.boatSides[2].setRotationPoint((float)(i / 2 - 1), (float)l, 0.0F);
26
        this.boatSides[3].addBox((float)(-i / 2 + 2), (float)(-j - 1), -1.0F, i - 4, j, 2, 0.0F);
27
        this.boatSides[3].setRotationPoint(0.0F, (float)l, (float)(-k / 2 + 1));
28
        this.boatSides[4].addBox((float)(-i / 2 + 2), (float)(-j - 1), -1.0F, i - 4, j, 2, 0.0F);
29
        this.boatSides[4].setRotationPoint(0.0F, (float)l, (float)(k / 2 - 1));
30
        this.boatSides[0].rotateAngleX = ((float)Math.PI / 2F);
31
        this.boatSides[1].rotateAngleY = ((float)Math.PI * 3F / 2F);
32
        this.boatSides[2].rotateAngleY = ((float)Math.PI / 2F);
33
        this.boatSides[3].rotateAngleY = (float)Math.PI;
34
    }
35
36
    /**
37
     * Sets the models various rotation angles then renders the model.
38
     */
39
    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)
40
    {
41
        for (int i = 0; i < 5; ++i)
42
        {
43
            this.boatSides[i].render(scale);
44
        }
45
    }
46
}
47

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