Class Beardifier
java.lang.Object
net.minecraft.world.level.levelgen.Beardifier
- All Implemented Interfaces:
DensityFunction,DensityFunction.SimpleFunction,DensityFunctions.BeardifierOrMarker
Modifies terrain noise to be flatter near structures such as villages.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BoundingBoxprivate static final float[]static final intprivate static final intstatic final Beardifierprotected final List<JigsawJunction> protected final List<Beardifier.Rigid> Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODECFields inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.BeardifierOrMarker
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionBeardifier(List<Beardifier.Rigid> pPieces, List<JigsawJunction> pJunctions, BoundingBox pAffectedBox) -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(DensityFunction.FunctionContext p_208200_) private static doublecomputeBeardContribution(int pX, double pY, int pZ) private static doublecomputeBeardContribution(int pX, int pY, int pZ) voidfillArray(double[] p_435636_, DensityFunction.ContextProvider p_435864_) static BeardifierforStructuresInChunk(StructureManager pStructureManager, ChunkPos pChunkPos) protected static doublegetBeardContribution(int pX, int pY, int pZ, int pHeight) protected static doublegetBuryContribution(double pX, double pY, double pZ) private static BoundingBoxincludeBoundingBox(BoundingBox pCurrent, BoundingBox pToInclude) private static booleanisInKernelRange(int pValue) doublemaxValue()doubleminValue()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction.SimpleFunction
mapAllMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.BeardifierOrMarker
codec
-
Field Details
-
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 -
EMPTY
-
pieces
-
junctions
-
affectedBox
-
-
Constructor Details
-
Beardifier
public Beardifier(List<Beardifier.Rigid> pPieces, List<JigsawJunction> pJunctions, @Nullable BoundingBox pAffectedBox)
-
-
Method Details
-
forStructuresInChunk
public static Beardifier forStructuresInChunk(StructureManager pStructureManager, ChunkPos pChunkPos) -
includeBoundingBox
private static BoundingBox includeBoundingBox(@Nullable BoundingBox pCurrent, BoundingBox pToInclude) -
fillArray
- Specified by:
fillArrayin interfaceDensityFunction- Specified by:
fillArrayin interfaceDensityFunction.SimpleFunction
-
compute
- Specified by:
computein interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
getBuryContribution
protected static double getBuryContribution(double pX, double pY, double pZ) -
getBeardContribution
protected static double getBeardContribution(int pX, int pY, int pZ, int pHeight) -
isInKernelRange
private static boolean isInKernelRange(int pValue) -
computeBeardContribution
private static double computeBeardContribution(int pX, int pY, int pZ) -
computeBeardContribution
private static double computeBeardContribution(int pX, double pY, int pZ)
-