Class BlendingData
java.lang.Object
net.minecraft.world.level.levelgen.blending.BlendingData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprotected static interfaceprotected static interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate final LevelHeightAccessorprivate static final double(package private) static final intprivate static final intprivate static final intprotected static final intprivate static final intprivate static final intprotected static final intprotected static final intprivate static final intprivate final double[][]private booleanprivate final double[]protected static final doubleprivate static final intprivate static final double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlendingData(int pSectionX, int pSectionZ, Optional<double[]> pHeights) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddValuesForColumn(int pIndex, ChunkAccess pChunk, int pX, int pZ) private voidcalculateData(ChunkAccess pChunk, Set<Direction8> pDirections) private intgetBiomeColumn(ChunkAccess pChunk, int pX, int pZ) private intgetCellYIndex(int pY) private intprivate doublegetDensity(double[] pHeights, int pY) protected doublegetDensity(int pX, int pY, int pZ) private double[]getDensityColumn(ChunkAccess pChunk, int pX, int pZ, int pHeight) protected doublegetHeight(int pX, int pY, int pZ) private intgetHeightAtXZ(ChunkAccess pChunk, int pX, int pZ) private static intgetInsideIndex(int pX, int pZ) private intgetMinY()static BlendingDatagetOrUpdateBlendingData(WorldGenRegion pRegion, int pChunkX, int pChunkZ) private static intgetOutsideIndex(int pX, int pZ) private static intgetX(int pIndex) private static intgetZ(int pIndex) private static booleanisGround(ChunkAccess pChunk, BlockPos pPos) protected voiditerateBiomes(int pX, int pY, int pZ, BlendingData.BiomeConsumer pConsumer) protected voiditerateDensities(int pX, int pZ, int pMinY, int pMaxY, BlendingData.DensityConsumer pConsumer) protected voiditerateHeights(int pX, int pZ, BlendingData.HeightConsumer pConsumer) pack()private intprivate static doubleread1(ChunkAccess pChunk, BlockPos.MutableBlockPos pPos) private static doubleread7(ChunkAccess pChunk, BlockPos.MutableBlockPos pPos) static Set<Direction8> sideByGenerationAge(WorldGenLevel pLevel, int pChunkX, int pChunkZ, boolean pOldNoiseGeneration) static BlendingDataunpack(BlendingData.Packed pPacked) private static intzeroIfNegative(int pValue)
-
Field Details
-
BLENDING_DENSITY_FACTOR
private static final double BLENDING_DENSITY_FACTOR- See Also:
-
CELL_WIDTH
protected static final int CELL_WIDTH- See Also:
-
CELL_HEIGHT
protected static final int CELL_HEIGHT- See Also:
-
CELL_RATIO
protected static final int CELL_RATIO- See Also:
-
SOLID_DENSITY
private static final double SOLID_DENSITY- See Also:
-
AIR_DENSITY
private static final double AIR_DENSITY- See Also:
-
CELLS_PER_SECTION_Y
private static final int CELLS_PER_SECTION_Y- See Also:
-
QUARTS_PER_SECTION
private static final int QUARTS_PER_SECTION -
CELL_HORIZONTAL_MAX_INDEX_INSIDE
private static final int CELL_HORIZONTAL_MAX_INDEX_INSIDE -
CELL_HORIZONTAL_MAX_INDEX_OUTSIDE
private static final int CELL_HORIZONTAL_MAX_INDEX_OUTSIDE -
CELL_COLUMN_INSIDE_COUNT
private static final int CELL_COLUMN_INSIDE_COUNT -
CELL_COLUMN_OUTSIDE_COUNT
private static final int CELL_COLUMN_OUTSIDE_COUNT -
CELL_COLUMN_COUNT
static final int CELL_COLUMN_COUNT -
areaWithOldGeneration
-
SURFACE_BLOCKS
-
NO_VALUE
protected static final double NO_VALUE- See Also:
-
hasCalculatedData
private boolean hasCalculatedData -
heights
private final double[] heights -
biomes
-
densities
private final transient double[][] densities
-
-
Constructor Details
-
BlendingData
-
-
Method Details
-
unpack
-
pack
-
getOrUpdateBlendingData
@Nullable public static BlendingData getOrUpdateBlendingData(WorldGenRegion pRegion, int pChunkX, int pChunkZ) -
sideByGenerationAge
public static Set<Direction8> sideByGenerationAge(WorldGenLevel pLevel, int pChunkX, int pChunkZ, boolean pOldNoiseGeneration) -
calculateData
-
addValuesForColumn
-
getHeightAtXZ
-
read1
-
read7
-
getDensityColumn
-
getBiomeColumn
-
isGround
-
getHeight
protected double getHeight(int pX, int pY, int pZ) -
getDensity
private double getDensity(@Nullable double[] pHeights, int pY) -
getDensity
protected double getDensity(int pX, int pY, int pZ) -
iterateBiomes
-
iterateHeights
-
iterateDensities
protected void iterateDensities(int pX, int pZ, int pMinY, int pMaxY, BlendingData.DensityConsumer pConsumer) -
cellCountPerColumn
private int cellCountPerColumn() -
quartCountPerColumn
private int quartCountPerColumn() -
getColumnMinY
private int getColumnMinY() -
getMinY
private int getMinY() -
getCellYIndex
private int getCellYIndex(int pY) -
getInsideIndex
private static int getInsideIndex(int pX, int pZ) -
getOutsideIndex
private static int getOutsideIndex(int pX, int pZ) -
getX
private static int getX(int pIndex) -
getZ
private static int getZ(int pIndex) -
zeroIfNegative
private static int zeroIfNegative(int pValue) -
getAreaWithOldGeneration
-