From 20bef6e26d948698398bd16aeab8c9e6b89110e4 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 22 Aug 2019 20:01:40 -0400 Subject: Format/import cleanup --- .../jewelrycraft/particles/EntityFlatShadowFX.java | 42 ++++++++-------------- 1 file changed, 15 insertions(+), 27 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/particles/EntityFlatShadowFX.java') diff --git a/src/main/java/darkknight/jewelrycraft/particles/EntityFlatShadowFX.java b/src/main/java/darkknight/jewelrycraft/particles/EntityFlatShadowFX.java index 2fd304d..59ad161 100755 --- a/src/main/java/darkknight/jewelrycraft/particles/EntityFlatShadowFX.java +++ b/src/main/java/darkknight/jewelrycraft/particles/EntityFlatShadowFX.java @@ -9,8 +9,8 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; public class EntityFlatShadowFX extends EntityFX { - float moteParticleScale; - ResourceLocation texture; + float moteParticleScale; + ResourceLocation texture; /** * @param world @@ -21,12 +21,10 @@ public class EntityFlatShadowFX extends EntityFX { * @param maxAge * @param texture */ - public EntityFlatShadowFX(World world, double x, double y, - double z, float size, float maxAge, + public EntityFlatShadowFX(World world, double x, double y, double z, float size, float maxAge, ResourceLocation texture) { super(world, x, y, z, 0D, 0D, 0D); - particleMaxAge = (int) (28D / (Math.random() * 0.3D + 0.7D) - * maxAge); + particleMaxAge = (int) (28D / (Math.random() * 0.3D + 0.7D) * maxAge); particleGravity = 0F; motionX = motionY = motionZ = 0; particleScale = size; @@ -45,37 +43,27 @@ public class EntityFlatShadowFX extends EntityFX { * @param maxZ */ @Override - public void renderParticle(Tessellator tessellator, - float partialTicks, float minX, float minY, - float minZ, float maxX, float maxZ) { + public void renderParticle(Tessellator tessellator, float partialTicks, float minX, float minY, float minZ, + float maxX, float maxZ) { tessellator.draw(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); tessellator.startDrawingQuads(); GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, - GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); float scale = 1F * particleScale; float x = (float) (posX - interpPosX); float y = (float) (posX - interpPosY); float z = (float) (posZ - interpPosZ); tessellator.setColorRGBA_F(0F, 0F, 0F, 1F); - tessellator.addVertexWithUV( - x - minX * scale - maxX * scale, - y + minY * scale, - z - minZ * scale - maxZ * scale, 0, 0); - tessellator.addVertexWithUV( - x - minX * scale + maxX * scale, - y + minY * scale, - z - minZ * scale + maxZ * scale, 1, 0); - tessellator.addVertexWithUV( - x + minX * scale + maxX * scale, - y + minY * scale, - z + minZ * scale + maxZ * scale, 1, 1); - tessellator.addVertexWithUV( - x + minX * scale - maxX * scale, - y + minY * scale, - z + minZ * scale - maxZ * scale, 0, 1); + tessellator.addVertexWithUV(x - minX * scale - maxX * scale, y + minY * scale, z - minZ * scale - maxZ * scale, + 0, 0); + tessellator.addVertexWithUV(x - minX * scale + maxX * scale, y + minY * scale, z - minZ * scale + maxZ * scale, + 1, 0); + tessellator.addVertexWithUV(x + minX * scale + maxX * scale, y + minY * scale, z + minZ * scale + maxZ * scale, + 1, 1); + tessellator.addVertexWithUV(x + minX * scale - maxX * scale, y + minY * scale, z + minZ * scale - maxZ * scale, + 0, 1); tessellator.draw(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_BLEND); -- cgit v1.2.3