clean up particles

This commit is contained in:
Sen 2025-07-08 22:27:26 +02:00
parent baa3f501b6
commit 2e7a3dd09a
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
4 changed files with 9 additions and 8 deletions

View file

@ -7,13 +7,14 @@ import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.RenderBuffer; import client.renderer.RenderBuffer;
import client.renderer.Tessellator; import client.renderer.Tessellator;
import client.renderer.particle.EffectRenderer;
import common.entity.projectile.EntityHook; import common.entity.projectile.EntityHook;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.Vec3; import common.util.Vec3;
public class RenderFish extends Render<EntityHook> public class RenderFish extends Render<EntityHook>
{ {
private static final String TEXTURE = "textures/entity/hook.png";
public RenderFish(RenderManager renderManagerIn) public RenderFish(RenderManager renderManagerIn)
{ {
super(renderManagerIn); super(renderManagerIn);
@ -43,10 +44,10 @@ public class RenderFish extends Render<EntityHook>
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL); worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
worldrenderer.pos(-0.5D, -0.5D, 0.0D).tex(0.0625D, 0.1875D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, -0.5D, 0.0D).tex(0.0D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, -0.5D, 0.0D).tex(0.125D, 0.1875D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, -0.5D, 0.0D).tex(0.25D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, 0.5D, 0.0D).tex(0.125D, 0.125D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, 0.5D, 0.0D).tex(0.25D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(-0.5D, 0.5D, 0.0D).tex(0.0625D, 0.125D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, 0.5D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
Tessellator.draw(); Tessellator.draw();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL11.glPopMatrix(); GL11.glPopMatrix();
@ -107,6 +108,6 @@ public class RenderFish extends Render<EntityHook>
*/ */
protected String getEntityTexture(EntityHook entity) protected String getEntityTexture(EntityHook entity)
{ {
return EffectRenderer.particleTextures; return TEXTURE;
} }
} }

View file

@ -27,7 +27,7 @@ import common.world.World;
public class EffectRenderer public class EffectRenderer
{ {
public static final String particleTextures = "textures/world/particles.png"; private static final String TEXTURE = "textures/world/particles.png";
/** Reference to the World object. */ /** Reference to the World object. */
protected World worldObj; protected World worldObj;
@ -224,7 +224,7 @@ public class EffectRenderer
{ {
case 0: case 0:
default: default:
this.renderer.bindTexture(particleTextures); this.renderer.bindTexture(TEXTURE);
break; break;
case 1: case 1:

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After