types.Noise
Seeded value noise in [-1, 1]. Sample it in bulk where you can: one call fills a whole chunk.
Methods
noise:at(x: number, z: number) -> numberThe noise at a 2D point. Divide block coordinates by a scale first: noise changes about once per unit.
noise:at3(x: number, y: number, z: number) -> numberThe noise at a 3D point.
Samples the noise at every column of chunk into out, 256 f64s with the column at local x, z at (x * 16 + z) * 8. Block coordinates are divided by scale first.
Range: scale: 0.0001..1000000000
Samples 3D noise through chunk from fromY up to toY into out, 256 * (toY - fromY) f32s with the block at local x, z and world y at ((x * 16 + z) * (toY - fromY) + y - fromY) * 4, ready for Chunk:carve. x and z are divided by scale and y by yScale (default scale). It samples every 4 blocks across and 8 up and blends between, so features smaller than that smear. toY - fromY is a multiple of 8.
Range: scale: 0.0001..1000000000, yScale: 0.0001..1000000000