Search in sources :

Example 6 with ISimplexData2D

use of rtg.api.util.noise.ISimplexData2D in project Realistic-Terrain-Generation by Team-RTG.

the class JitterEffect method added.

@Override
public final float added(RTGWorld rtgWorld, float x, float y) {
    ISimplexData2D jitterData = SimplexData2D.newDisk();
    rtgWorld.simplexInstance(1).multiEval2D(x / wavelength, y / wavelength, jitterData);
    int pX = (int) Math.round(x + jitterData.getDeltaX() * amplitude);
    int pY = (int) Math.round(y + jitterData.getDeltaY() * amplitude);
    return jittered.added(rtgWorld, pX, pY);
}
Also used : ISimplexData2D(rtg.api.util.noise.ISimplexData2D)

Aggregations

ISimplexData2D (rtg.api.util.noise.ISimplexData2D)6 BlockPos (net.minecraft.util.math.BlockPos)1 MutableBlockPos (net.minecraft.util.math.BlockPos.MutableBlockPos)1 ChunkPos (net.minecraft.util.math.ChunkPos)1 BiomeProvider (net.minecraft.world.biome.BiomeProvider)1 Chunk (net.minecraft.world.chunk.Chunk)1 ChunkPrimer (net.minecraft.world.chunk.ChunkPrimer)1 VoronoiResult (rtg.api.util.noise.VoronoiResult)1 IRealisticBiome (rtg.api.world.biome.IRealisticBiome)1