Noise .java

net.minecraft.world.level.levelgen.synth.Noise (interface, 32 lines): members: addToVolume, range, get. imports: DensityBuffer, DensityVolume, Interval.

net.minecraft.world.level.levelgen.synthinterface32 linescommon942 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

Noise.java32 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.synth;
2
3
import net.minecraft.util.Interval;
4
import net.minecraft.world.level.levelgen.densityfunction.DensityBuffer;
5
import net.minecraft.world.level.levelgen.densityfunction.DensityVolume;
6
7
public interface Noise {
8
	Interval range();
9
10
	float get(double x, double y);
11
12
	float get(double x, double y, double z);
13
14
	default void addToVolume(final DensityBuffer buffer, final DensityVolume volume, final double xzScale, final double yScale, final float amplitude) {
15
		int index = 0;
16
17
		for (int indexZ = 0; indexZ < volume.sizeZ(); indexZ++) {
18
			double z = volume.blockZ(indexZ) * xzScale;
19
20
			for (int indexX = 0; indexX < volume.sizeX(); indexX++) {
21
				double x = volume.blockX(indexX) * xzScale;
22
23
				for (int indexY = 0; indexY < volume.sizeY(); indexY++) {
24
					double y = volume.blockY(indexY) * yScale;
25
					buffer.addTo(index, amplitude * this.get(x, y, z));
26
					index++;
27
				}
28
			}
29
		}
30
	}
31
}
32

Decompiled Minecraft 26.3 source of Noise (net/minecraft/world/level/levelgen/synth/Noise.java) with Mojang official mappings, stored verbatim on the site.