Capes
Before Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 510 B |
Before Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 635 B |
Before Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 838 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 700 B |
59640
javascript/classes.js
|
@ -35,8 +35,55 @@ public class LayerCape implements LayerRenderer<AbstractClientPlayer> {
|
|||
this.playerRenderer = playerRendererIn;
|
||||
}
|
||||
|
||||
public void doRenderLayer(AbstractClientPlayer abstractclientplayer, float var2, float var3, float f, float var5,
|
||||
float var6, float var7, float var8) {
|
||||
public void doRenderLayer(AbstractClientPlayer abstractclientplayer, float var2, float var3, float f, float var5, float var6, float var7, float var8) {
|
||||
if (abstractclientplayer.hasPlayerInfo() && !abstractclientplayer.isInvisible()
|
||||
&& abstractclientplayer.isWearing(EnumPlayerModelParts.CAPE)
|
||||
&& this.playerRenderer.getMainModel() instanceof ModelPlayer) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.playerRenderer.bindTexture(new ResourceLocation("/capes/cape.png"));
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 0.0F, 0.125F);
|
||||
double d0 = abstractclientplayer.prevChasingPosX
|
||||
+ (abstractclientplayer.chasingPosX - abstractclientplayer.prevChasingPosX) * (double) f
|
||||
- (abstractclientplayer.prevPosX
|
||||
+ (abstractclientplayer.posX - abstractclientplayer.prevPosX) * (double) f);
|
||||
double d1 = abstractclientplayer.prevChasingPosY
|
||||
+ (abstractclientplayer.chasingPosY - abstractclientplayer.prevChasingPosY) * (double) f
|
||||
- (abstractclientplayer.prevPosY
|
||||
+ (abstractclientplayer.posY - abstractclientplayer.prevPosY) * (double) f);
|
||||
double d2 = abstractclientplayer.prevChasingPosZ
|
||||
+ (abstractclientplayer.chasingPosZ - abstractclientplayer.prevChasingPosZ) * (double) f
|
||||
- (abstractclientplayer.prevPosZ
|
||||
+ (abstractclientplayer.posZ - abstractclientplayer.prevPosZ) * (double) f);
|
||||
float f1 = abstractclientplayer.prevRenderYawOffset
|
||||
+ (abstractclientplayer.renderYawOffset - abstractclientplayer.prevRenderYawOffset) * f;
|
||||
double d3 = (double) MathHelper.sin(f1 * 3.1415927F / 180.0F);
|
||||
double d4 = (double) (-MathHelper.cos(f1 * 3.1415927F / 180.0F));
|
||||
float f2 = (float) d1 * 10.0F;
|
||||
f2 = MathHelper.clamp_float(f2, -6.0F, 32.0F);
|
||||
float f3 = (float) (d0 * d3 + d2 * d4) * 100.0F;
|
||||
float f4 = (float) (d0 * d4 - d2 * d3) * 100.0F;
|
||||
if (f3 < 0.0F) {
|
||||
f3 = 0.0F;
|
||||
}
|
||||
|
||||
float f5 = abstractclientplayer.prevCameraYaw
|
||||
+ (abstractclientplayer.cameraYaw - abstractclientplayer.prevCameraYaw) * f;
|
||||
f2 = f2 + MathHelper.sin((abstractclientplayer.prevDistanceWalkedModified
|
||||
+ (abstractclientplayer.distanceWalkedModified - abstractclientplayer.prevDistanceWalkedModified)
|
||||
* f)
|
||||
* 6.0F) * 32.0F * f5;
|
||||
if (abstractclientplayer.isSneaking()) {
|
||||
f2 += 25.0F;
|
||||
}
|
||||
|
||||
GlStateManager.rotate(6.0F + f3 / 2.0F + f2, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotate(f4 / 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.rotate(-f4 / 2.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
((ModelPlayer) this.playerRenderer.getMainModel()).renderCape(0.0625F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldCombineTextures() {
|
||||
|
|