CachingDensitySampler .java

net.minecraft.world.level.levelgen.densityfunction.CachingDensitySampler (record, 14 lines): members: input, sampleVolume, sampleValue.

net.minecraft.world.level.levelgen.densityfunctionrecord14 linescommon572 B

Implements

API Surface (2)

void sampleVolume(final SamplerContext context, final DensityBuffer outputBuffer, final DensityVolume volume)
float sampleValue(final SamplerContext context, final int blockX, final int blockY, final int blockZ)

Code Graph: Dependencies (4)

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

Full Source

CachingDensitySampler.java14 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.densityfunction;
2
3
public record CachingDensitySampler(int id, DensitySampler input) implements DensitySampler {
4
	@Override
5
	public void sampleVolume(final SamplerContext context, final DensityBuffer outputBuffer, final DensityVolume volume) {
6
		context.sampleVolumeCached(this.id, this.input, outputBuffer, volume);
7
	}
8
9
	@Override
10
	public float sampleValue(final SamplerContext context, final int blockX, final int blockY, final int blockZ) {
11
		return context.sampleValueCached(this.id, this.input, blockX, blockY, blockZ);
12
	}
13
}
14

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