Class Beardifier
java.lang.Object
net.minecraft.world.level.levelgen.Beardifier
- All Implemented Interfaces:
DensitySampler
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable BoundingBoxprivate static final float[]static final intprivate static final intstatic final ContextKey<Beardifier> static final Beardifierprotected final List<JigsawJunction> private static final floatprotected final List<Beardifier.Rigid> static final Interval -
Constructor Summary
ConstructorsConstructorDescriptionBeardifier(List<Beardifier.Rigid> pieces, List<JigsawJunction> junctions, @Nullable BoundingBox affectedBox) -
Method Summary
Modifier and TypeMethodDescriptionprivate static doublecomputeBeardContribution(int dx, double dy, int dz) private static doublecomputeBeardContribution(int dx, int dy, int dz) static BeardifierforStructuresInChunk(StructureManager structureManager, ChunkPos chunkPos) protected static floatgetBeardContribution(int dx, int dy, int dz, int yToGround) protected static floatgetBuryContribution(float dx, float dy, float dz) private static BoundingBoxincludeBoundingBox(@Nullable BoundingBox encompassingBox, BoundingBox newBox) private static booleanisInKernelRange(int xi) floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) private floatsampleValueUnchecked(int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DensitySampler
bind
-
Field Details
-
RANGE
-
CONTEXT_KEY
-
BEARD_KERNEL_RADIUS
public static final int BEARD_KERNEL_RADIUS- See Also:
-
BEARD_KERNEL_SIZE
private static final int BEARD_KERNEL_SIZE- See Also:
-
BEARD_KERNEL
private static final float[] BEARD_KERNEL -
MAX_BURY_DISTANCE
private static final float MAX_BURY_DISTANCE- See Also:
-
EMPTY
-
pieces
-
junctions
-
affectedBox
-
-
Constructor Details
-
Beardifier
public Beardifier(List<Beardifier.Rigid> pieces, List<JigsawJunction> junctions, @Nullable BoundingBox affectedBox)
-
-
Method Details
-
forStructuresInChunk
-
includeBoundingBox
private static BoundingBox includeBoundingBox(@Nullable BoundingBox encompassingBox, BoundingBox newBox) -
sampleVolume
- Specified by:
sampleVolumein interfaceDensitySampler
-
sampleValue
- Specified by:
sampleValuein interfaceDensitySampler
-
sampleValueUnchecked
private float sampleValueUnchecked(int blockX, int blockY, int blockZ) -
getBuryContribution
protected static float getBuryContribution(float dx, float dy, float dz) -
getBeardContribution
protected static float getBeardContribution(int dx, int dy, int dz, int yToGround) -
isInKernelRange
private static boolean isInKernelRange(int xi) -
computeBeardContribution
private static double computeBeardContribution(int dx, int dy, int dz) -
computeBeardContribution
private static double computeBeardContribution(int dx, double dy, int dz)
-