diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 2dc681008..0998f10b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -189,9 +189,10 @@ public final class AssetUtil{ @SideOnly(Side.CLIENT) public static void renderParticlesFromAToB(double startX, double startY, double startZ, double endX, double endY, double endZ, int particleAmount, float particleSize, float[] color, float ageMultiplier){ - World world = Minecraft.getMinecraft().theWorld; + Minecraft mc = Minecraft.getMinecraft(); + int particleSetting = mc.gameSettings.particleSetting; - if(Minecraft.getMinecraft().thePlayer.getDistance(startX, startY, startZ) <= 64 || Minecraft.getMinecraft().thePlayer.getDistance(endX, endY, endZ) <= 64){ + if(mc.thePlayer.getDistance(startX, startY, startZ) <= 64 || mc.thePlayer.getDistance(endX, endY, endZ) <= 64){ double difX = startX-endX; double difY = startY-endY; double difZ = startZ-endZ; @@ -199,8 +200,10 @@ public final class AssetUtil{ for(int times = 0; times < Math.max(particleAmount/2, 1); times++){ for(double i = 0; i <= 1; i += 1/(distance*particleAmount)){ - ParticleColored fx = new ParticleColored(world, (difX*i)+endX+0.5, (difY*i)+endY+0.5, (difZ*i)+endZ+0.5, particleSize, color[0], color[1], color[2], ageMultiplier); - Minecraft.getMinecraft().effectRenderer.addEffect(fx); + if(particleSetting == 0 || (particleSetting == 1 && mc.theWorld.rand.nextFloat() >= 0.8F) || (particleSetting > 1 && mc.theWorld.rand.nextFloat() >= 0.98F)){ + ParticleColored fx = new ParticleColored(mc.theWorld, (difX*i)+endX+0.5, (difY*i)+endY+0.5, (difZ*i)+endZ+0.5, particleSize, color[0], color[1], color[2], ageMultiplier); + mc.effectRenderer.addEffect(fx); + } } } }