From 7fb62cb85917beed48720caccdd948b71d851d30 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Tue, 5 Nov 2024 19:32:29 +0100 Subject: [PATCH] Fix particle vertex format (Fixes the color) Fix alpha not being fed to the color int provided to the ParticleBeam --- .../ellpeck/actuallyadditions/mod/particle/ParticleBeam.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java index 7165fd692..d086a2fd7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java @@ -37,9 +37,8 @@ public class ParticleBeam extends Particle { public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { RenderSystem.disableCull(); RenderSystem.enableBlend(); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 0.2F); RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE); - return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); + return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); } @Override @@ -101,7 +100,7 @@ public class ParticleBeam extends Particle { public static ParticleOptions createData(double endX, double endY, double endZ, int color, float alpha, int maxAge, double rotationTime, float size) { - return new BeamParticleData(endX, endY, endZ, color, maxAge, rotationTime, size); + return new BeamParticleData(endX, endY, endZ, FastColor.ARGB32.color((int)(alpha * 255F), color), maxAge, rotationTime, size); } } }