Skip to content

Commit

Permalink
Oops let's fix that
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Oct 26, 2024
1 parent 12ae297 commit fc2e38f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ public class HSParticleHandler
public static void spawnColoredParticle(EnumParticleTypes type, double x, double y, double z, Color color, double velX, double velY, double velZ)
{
Particle particle = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(type.getParticleID(), x, y, z, velX, velY, velZ);
float randBrightness = 0.5F + (float) Math.random();

particle.setRBGColorF((color.getRed() / 255.0F) * randBrightness, (color.getGreen() / 255.0F) * randBrightness, (color.getBlue() / 255.0F) * randBrightness);
particle.setRBGColorF((color.getRed() / 255.0F), (color.getGreen() / 255.0F), (color.getBlue() / 255.0F));
}

public static void spawnDarkColoredParticle(EnumParticleTypes type, double x, double y, double z, Color color, double velX, double velY, double velZ)
{
Particle particle = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(type.getParticleID(), x, y, z, velX, velY, velZ);
float randBrightness = 0.5F + (float) Math.random();

particle.setRBGColorF((color.getRed() / 255.0F), (color.getGreen() / 255.0F), (color.getBlue() / 255.0F));
particle.setRBGColorF((color.getRed() / 255.0F) * randBrightness, (color.getGreen() / 255.0F) * randBrightness, (color.getBlue() / 255.0F) * randBrightness);
}

public static void spawnBeamParticles(EnumParticleTypes type, World world, double sourceX, double sourceY, double sourceZ, Color color, double targetX, double targetY, double targetZ)
Expand All @@ -40,7 +40,7 @@ public static void spawnBeamParticles(EnumParticleTypes type, World world, doubl
double x = sourceX + (targetX - sourceX) * beam + world.rand.nextGaussian() * 0.005;
double y = sourceY + (targetY - sourceY) * beam + world.rand.nextGaussian() * 0.005;
double z = sourceZ + (targetZ - sourceZ) * beam + world.rand.nextGaussian() * 0.005;

spawnColoredParticle(type, x, y, z, color, velX, velY, velZ);
}
}
Expand Down

0 comments on commit fc2e38f

Please sign in to comment.