mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Make the empowerer particles respond to the particle option
Closes #364
This commit is contained in:
parent
b2372d4231
commit
cb99c7859e
1 changed files with 7 additions and 4 deletions
|
@ -189,9 +189,10 @@ public final class AssetUtil{
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@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){
|
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 difX = startX-endX;
|
||||||
double difY = startY-endY;
|
double difY = startY-endY;
|
||||||
double difZ = startZ-endZ;
|
double difZ = startZ-endZ;
|
||||||
|
@ -199,8 +200,10 @@ public final class AssetUtil{
|
||||||
|
|
||||||
for(int times = 0; times < Math.max(particleAmount/2, 1); times++){
|
for(int times = 0; times < Math.max(particleAmount/2, 1); times++){
|
||||||
for(double i = 0; i <= 1; i += 1/(distance*particleAmount)){
|
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);
|
if(particleSetting == 0 || (particleSetting == 1 && mc.theWorld.rand.nextFloat() >= 0.8F) || (particleSetting > 1 && mc.theWorld.rand.nextFloat() >= 0.98F)){
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue