Skip to content
Permalink
Browse files

Shurikens now spin while in the air.

  • Loading branch information...
Ri5ux committed Feb 25, 2019
1 parent 7fea545 commit a005d0be02bbbb7a63fc22ab38a7c905a95efa19
@@ -6,6 +6,7 @@

import com.asx.mdx.lib.client.util.Draw;
import com.asx.mdx.lib.client.util.OpenGL;
import com.asx.mdx.lib.util.Game;

import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.Render;
@@ -28,8 +29,15 @@ public void doRender(EntityShuriken entity, double posX, double posY, double pos
OpenGL.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * renderPartialTicks, 0.0F, 0.0F, 1.0F);
OpenGL.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * renderPartialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.disableCull();

if (!entity.isInGround())
{
OpenGL.rotate(360 - (entity.world.getWorldTime() % 360 + Game.partialTicks()) * 60, 0, 1, 0);
}

OpenGL.translate(-0.5F, 0.0F, -0.5F);
GL11.glNormal3f(0.0F, 1.0F, 0.0F);
OpenGL.rotate(90, 1, 0, 0);
AliensVsPredator.resources().SHURIKEN.bind();
Draw.drawQuad(0, 0, 1, 1, 0, 0.5F, 0F, 0F, 0.5F);
OpenGL.enable(GL11.GL_CULL_FACE);
Oops, something went wrong.

0 comments on commit a005d0b

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.