Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gemsb committed Feb 1, 2025
1 parent e6c03c0 commit 4b73a05
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,22 @@ public double nextGaussian() {
}
};

long start = 0;

@Override
public void onStartTick(ClientWorld world) {
PlayerEntity player = SoundPlayerGetterClient.player;
BlockPos pos = player.getBlockPos();

if(!(world.getTime()%20==0)) return;

if (start == 0) start = world.getTime();

if(world.getTime() < start + 20) {
return;
};
start += 20;
//if (!(world.getTime() % 20 == 0)) return;

CalculateWindAngle(world, player, pos);
if(Math.random() > 0.2) return;

Expand Down Expand Up @@ -179,9 +189,9 @@ public boolean ownerEquals(RegistryEntryOwner<DoublePerlinNoiseSampler.NoisePara

DensityFunction.Noise radNoise = new DensityFunction.Noise(noiseParam, DoublePerlinNoiseSampler.create(radRandom, new DoublePerlinNoiseSampler.NoiseParameters(-7, 1,2,3,2,4,2.4,9)));
DensityFunction.Noise speedNoise = new DensityFunction.Noise(noiseParam, DoublePerlinNoiseSampler.create(speedRandom, new DoublePerlinNoiseSampler.NoiseParameters(-7, 1,2,3,2,4,2.4,9)));

double rad = radNoise.sample(player.getX()/75, world.getTime()/6000f, player.getZ()/75)*Math.PI;
double speed = speedNoise.sample(player.getX()/75, world.getTime()/3000f, player.getZ()/75);
System.out.println(world.getTime());
double rad = radNoise.sample(player.getX()/75d, world.getTime()/600d, player.getZ()/75d)*Math.PI;
double speed = speedNoise.sample(player.getX()/75d, world.getTime()/300d, player.getZ()/75d);

windX = speed*Math.sin(rad);
windZ = speed*Math.cos(rad);
Expand Down

0 comments on commit 4b73a05

Please sign in to comment.