Skip to content

Commit

Permalink
Use RenderUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
Edivad99 committed Jan 28, 2024
1 parent 5c32534 commit 2bf42d3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package mods.railcraft.client.particle;

import mods.railcraft.client.util.RenderUtil;
import mods.railcraft.particle.ForceSpawnParticleOptions;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.Particle;
Expand All @@ -17,9 +18,9 @@ public ForceSpawnParticle(ClientLevel level, double x, double y, double z, doubl
double dz, int color, float scale, SpriteSet sprites) {
super(level, x, y, z, dx, dy, dz, scale);
this.gravity = -0.1F;
this.rCol = ((color >> 16) & 0xFF) / 255F;
this.gCol = ((color >> 8) & 0xFF) / 255F;
this.bCol = ((color) & 0xFF) / 255F;
this.rCol = RenderUtil.getRed(color);
this.gCol = RenderUtil.getGreen(color);
this.bCol = RenderUtil.getBlue(color);
this.lifetime = (int) (8.0F / (this.random.nextFloat() * 0.8F + 0.2F));
this.lifetime = (int) ((float) this.lifetime * scale);
this.hasPhysics = false;
Expand Down

0 comments on commit 2bf42d3

Please sign in to comment.