Energy FX is now much more light weight.

This commit is contained in:
AlgorithmX2
2014-04-24 02:13:52 -05:00
parent 07a98270c3
commit 27b9d0f4cd
+15 -17
View File
@@ -1,17 +1,12 @@
package appeng.client.render.effects; package appeng.client.render.effects;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityBreakingFX; import net.minecraft.client.particle.EntityBreakingFX;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import appeng.client.texture.ExtraTextures; import appeng.client.texture.ExtraTextures;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@@ -26,6 +21,11 @@ public class EnergyFx extends EntityBreakingFX
private int startBlkY; private int startBlkY;
private int startBlkZ; private int startBlkZ;
public int getFXLayer()
{
return 1;
}
public EnergyFx(World par1World, double par2, double par4, double par6, Item par8Item) { public EnergyFx(World par1World, double par2, double par4, double par6, Item par8Item) {
super( par1World, par2, par4, par6, par8Item ); super( par1World, par2, par4, par6, par8Item );
particleGravity = 0; particleGravity = 0;
@@ -58,16 +58,14 @@ public class EnergyFx extends EntityBreakingFX
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{ {
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture ); /*
* Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
GL11.glPushMatrix(); *
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); * GL11.glPushMatrix(); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F ); *
* GL11.glDepthMask( false ); GL11.glEnable( GL11.GL_BLEND ); GL11.glBlendFunc( GL11.GL_SRC_ALPHA,
GL11.glDepthMask( false ); * GL11.GL_ONE_MINUS_SRC_ALPHA ); GL11.glAlphaFunc( GL11.GL_GREATER, 0.003921569F );
GL11.glEnable( GL11.GL_BLEND ); */
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
GL11.glAlphaFunc( GL11.GL_GREATER, 0.003921569F );
float f6 = this.particleTextureIndex.getMinU(); float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU(); float f7 = this.particleTextureIndex.getMaxU();
@@ -97,8 +95,8 @@ public class EnergyFx extends EntityBreakingFX
(double) f6, (double) f9 ); (double) f6, (double) f9 );
} }
GL11.glPopAttrib(); // GL11.glPopAttrib();
GL11.glPopMatrix(); // GL11.glPopMatrix();
} }
} }