reformatted all src files (#141)

This commit is contained in:
YoungOnion
2022-09-17 05:08:02 -06:00
committed by GitHub
parent 3328bfcda2
commit 9011273229
1056 changed files with 88127 additions and 110597 deletions
@@ -19,46 +19,42 @@
package appeng.client.render.effects;
import java.util.Random;
import net.minecraft.world.World;
import java.util.Random;
public class LightningArcFX extends LightningFX
{
private static final Random RANDOM_GENERATOR = new Random();
private final double rx;
private final double ry;
private final double rz;
public class LightningArcFX extends LightningFX {
private static final Random RANDOM_GENERATOR = new Random();
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
{
super( w, x, y, z, r, g, b, 6 );
private final double rx;
private final double ry;
private final double rz;
this.rx = ex - x;
this.ry = ey - y;
this.rz = ez - z;
public LightningArcFX(final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b) {
super(w, x, y, z, r, g, b, 6);
this.regen();
}
this.rx = ex - x;
this.ry = ey - y;
this.rz = ez - z;
@Override
protected void regen()
{
final double i = 1.0 / ( this.getSteps() - 1 );
final double lastDirectionX = this.rx * i;
final double lastDirectionY = this.ry * i;
final double lastDirectionZ = this.rz * i;
this.regen();
}
final double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
for( int s = 0; s < this.getSteps(); s++ )
{
final double[][] localSteps = this.getPrecomputedSteps();
@Override
protected void regen() {
final double i = 1.0 / (this.getSteps() - 1);
final double lastDirectionX = this.rx * i;
final double lastDirectionY = this.ry * i;
final double lastDirectionZ = this.rz * i;
localSteps[s][0] = ( lastDirectionX + ( RANDOM_GENERATOR.nextDouble() - 0.5 ) * len * 1.2 ) / 2.0;
localSteps[s][1] = ( lastDirectionY + ( RANDOM_GENERATOR.nextDouble() - 0.5 ) * len * 1.2 ) / 2.0;
localSteps[s][2] = ( lastDirectionZ + ( RANDOM_GENERATOR.nextDouble() - 0.5 ) * len * 1.2 ) / 2.0;
}
}
final double len = Math.sqrt(lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ);
for (int s = 0; s < this.getSteps(); s++) {
final double[][] localSteps = this.getPrecomputedSteps();
localSteps[s][0] = (lastDirectionX + (RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
localSteps[s][1] = (lastDirectionY + (RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
localSteps[s][2] = (lastDirectionZ + (RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
}
}
}