Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCapes.java
More file actions
Latest commit
72 lines (57 loc) · 3.46 KB
/
Copy pathCapes.java
File metadata and controls
72 lines (57 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
publicclassCapesimplementsLayerRenderer<AbstractClientPlayer> {
publicstaticbooleancapeEnabled = true;
privatestaticfinalGameProfileGameProfile = null;
privatefinalRenderPlayerplayerRenderer;
StringClientOwner = "iMPDevMC"; // d18cfba16c754b66bf2e6fbc5c72306f | ClientOwner
publicCapes(RenderPlayerplayerRendererIn) {
this.playerRenderer = playerRendererIn;
}
publicvoiddoRenderLayer(AbstractClientPlayerentitylivingbaseIn, floatp_177141_2_, floatp_177141_3_,
floatpartialTicks, floatp_177141_5_, floatp_177141_6_, floatp_177141_7_, floatscale) {
/** Client Owner Cape */
if (entitylivingbaseIn.getName().equals(ClientOwner) && !entitylivingbaseIn.isInvisible()) {
ResourceLocationCape;
ResourceLocationACape;
Cape = newResourceLocation("impdevmc/cosmetics/capes/ClientOwner.png");
ACape = newResourceLocation("impdevmc/cosmetics/animated_capes/iMPDevMC.gif");
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.playerRenderer.bindTexture(Cape);
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 0.0F, 0.125F);
doubled0 = entitylivingbaseIn.prevChasingPosX + (entitylivingbaseIn.chasingPosX - entitylivingbaseIn.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevPosX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevPosX) * (double)partialTicks);
doubled1 = entitylivingbaseIn.prevChasingPosY + (entitylivingbaseIn.chasingPosY - entitylivingbaseIn.prevChasingPosY) * (double)partialTicks - (entitylivingbaseIn.prevPosY + (entitylivingbaseIn.posY - entitylivingbaseIn.prevPosY) * (double)partialTicks);
doubled2 = entitylivingbaseIn.prevChasingPosZ + (entitylivingbaseIn.chasingPosZ - entitylivingbaseIn.prevChasingPosZ) * (double)partialTicks - (entitylivingbaseIn.prevPosZ + (entitylivingbaseIn.posZ - entitylivingbaseIn.prevPosZ) * (double)partialTicks);
floatf = entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks;
doubled3 = (double)MathHelper.sin(f * (float)Math.PI / 180.0F);
doubled4 = (double)(-MathHelper.cos(f * (float)Math.PI / 180.0F));
floatf1 = (float)d1 * 10.0F;
f1 = MathHelper.clamp_float(f1, -6.0F, 32.0F);
floatf2 = (float)(d0 * d3 + d2 * d4) * 100.0F;
floatf3 = (float)(d0 * d4 - d2 * d3) * 100.0F;
if (f2 < 0.0F)
{
f2 = 0.0F;
}
if (f2 > 165.0F)
{
f2 = 165.0F;
}
floatf4 = entitylivingbaseIn.prevCameraYaw + (entitylivingbaseIn.cameraYaw - entitylivingbaseIn.prevCameraYaw) * partialTicks;
f1 = f1 + MathHelper.sin((entitylivingbaseIn.prevDistanceWalkedModified + (entitylivingbaseIn.distanceWalkedModified - entitylivingbaseIn.prevDistanceWalkedModified) * partialTicks) * 6.0F) * 32.0F * f4;
if (entitylivingbaseIn.isSneaking())
{
f1 += 25.0F;
GlStateManager.translate(0.0F, 0.142F, -0.0178F);
}
GlStateManager.rotate(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
this.playerRenderer.getMainModel().renderCape(0.0625F);
GlStateManager.popMatrix();
}
}
publicbooleanshouldCombineTextures() {
returnfalse;
}
}