Cleanup & update version info

This commit is contained in:
yorkeJohn committed 2017-08-10 11:53:22 -03:00
1 parent 6c7246f7b4
commit bef1a28089
15 files changed
+78 -70

No files matched your search

@@ -1,5 +1,9 @@
package taintedmagic.client.renderer;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
@@ -7,14 +11,9 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import taintedmagic.common.TaintedMagic;
import taintedmagic.common.items.tools.ItemKatana;
import thaumcraft.client.lib.UtilsFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly (Side.CLIENT)
public class RenderItemKatana implements IItemRenderer
@@ -39,13 +38,11 @@ public class RenderItemKatana implements IItemRenderer
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(1.4F, 1.4F, 1.4F);
if ( (p.getHeldItem() == null || p.getHeldItem() != s) && t != ItemRenderType.EQUIPPED)
{
GL11.glPushMatrix();
if (t == ItemRenderType.ENTITY)
{
GL11.glScalef(0.5F, 0.5F, 0.5F);
@@ -63,8 +60,10 @@ public class RenderItemKatana implements IItemRenderer
{
GL11.glTranslatef(0.0F, -0.7F, 0.0F);
}
Minecraft.getMinecraft().renderEngine.bindTexture(ItemKatana.getTexture(s));
UtilsFX.bindTexture(ItemKatana.getTexture(s));
ItemKatana.saya.render(0.0625F);
GL11.glPopMatrix();
}
@@ -106,7 +105,7 @@ public class RenderItemKatana implements IItemRenderer
GL11.glTranslatef(0.0F, 2F, 0.65F);
}
Minecraft.getMinecraft().renderEngine.bindTexture(ItemKatana.getTexture(s));
UtilsFX.bindTexture(ItemKatana.getTexture(s));
ItemKatana.katana.render(0.0625F);
@@ -154,29 +153,38 @@ public class RenderItemKatana implements IItemRenderer
public static void drawRune (double x, double y, double z, int rune, EntityPlayer player)
{
GL11.glPushMatrix();
UtilsFX.bindTexture("textures/misc/script.png");
float r = MathHelper.sin( (player.ticksExisted + rune * 5) / 5.0F) * 0.1F + 0.88F;
float g = MathHelper.sin( (player.ticksExisted + rune * 5) / 7.0F) * 0.1F + 0.63F;
float alpha = MathHelper.sin( (player.ticksExisted + rune * 5) / 10.0F) * 0.3F;
GL11.glColor4f(r, g, 0.2F, alpha + 0.6F);
GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);
GL11.glTranslated(x, y, z);
Tessellator tessellator = Tessellator.instance;
Tessellator t = Tessellator.instance;
float f = 0.0625F * rune;
float f1 = f + 0.0625F;
float f2 = 0.0F;
float f3 = 1.0F;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(r, g, 0.2F, alpha + 0.6F);
tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, f1, f3);
tessellator.addVertexWithUV(0.06D + alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, f1, f2);
tessellator.addVertexWithUV(0.06D + alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, f, f2);
tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, f, f3);
tessellator.draw();
t.startDrawingQuads();
t.setColorRGBA_F(r, g, 0.2F, alpha + 0.6F);
t.addVertexWithUV(-0.06D - alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, f1, f3);
t.addVertexWithUV(0.06D + alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, f1, f2);
t.addVertexWithUV(0.06D + alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, f, f2);
t.addVertexWithUV(-0.06D - alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, f, f3);
t.draw();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}
}