Permalink
Browse files

Fixed the legcaster

  • Loading branch information...
Ri5ux committed Sep 28, 2018
1 parent 5588e92 commit d1832e956220a3ebe67091150ae983be719ef832
@@ -1,6 +1,7 @@
package org.avp.client.model.items;
import com.arisux.mdx.lib.client.render.model.Model;
import com.arisux.mdx.lib.game.Game;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
@@ -87,15 +88,20 @@ public void render(Object obj)
if (swingProgress(obj) > -9990.0F)
{
float progress = swingProgress(obj);
progress = 1.0F - swingProgress(obj);
progress *= progress;
progress *= progress;
progress = 1.0F - progress;
float p1 = MathHelper.sin(progress * (float)Math.PI);
float p2 = MathHelper.sin(swingProgress(obj) * (float)Math.PI) * -(0F - 0.7F) * 0.75F;
this.supportBar.rotateAngleX = (float)((double)this.supportBar.rotateAngleX - ((double)p1 * 1.2D + (double)p2));
this.supportBar.rotateAngleZ = MathHelper.sin(swingProgress(obj) * (float)Math.PI) * -0.4F;
// float progress = swingProgress(obj);
// progress = 1.0F - swingProgress(obj);
// progress *= progress;
// progress *= progress;
// progress = 1.0F - progress;
// float p1 = MathHelper.sin(progress * (float)Math.PI);
// float p2 = -MathHelper.sin((float) (swingProgress(obj) * 0.67F)) * -(0F - 0.7F) * 0.75F;
//
//// p1 = 0F;
//// p2 = 0F;
////
//// p1 = swingProgress(obj);
// this.supportBar.rotateAngleX = (float)((double)this.supportBar.rotateAngleX - ((double)p1 * 1.2D + (double)p2));
//// this.supportBar.rotateAngleZ = MathHelper.sin(swingProgress(obj) * (float)Math.PI) * -0.4F;
}
this.swivelHinge.rotateAngleX = (float) Math.toRadians(-30 + headPitch(obj));
@@ -19,13 +19,11 @@
import com.arisux.mdx.lib.client.render.model.MapModelTexture;
import com.arisux.mdx.lib.game.Game;
import com.arisux.mdx.lib.util.MDXMath;
import com.arisux.mdx.lib.world.Worlds;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
@@ -87,19 +85,16 @@ public void render(Event event, float partialTicks)
OpenGL.pushMatrix();
OpenGL.scale(scale, -scale, -scale);
OpenGL.rotate(rotationYaw, 0F, 1F, 0F);
OpenGL.translate(-0.75F, -0.125F, -0.55F);
float cannonHeight = player.getEyeHeight() > 1.6F ? 0F : 0.65F;
OpenGL.translate(-0.85F, -3.425F + cannonHeight, -0.85F);
OpenGL.rotate(-25F, 0F, 0F, 1F);
MODEL.bindTexture();
MODEL.getModel().render(player);
OpenGL.popMatrix();
}
}
}
}
if (event instanceof RenderLivingEvent.Post)
{
RenderLivingEvent.Post pre = (RenderLivingEvent.Post) event;
}
}
@Override

0 comments on commit d1832e9

Please sign in to comment.