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 doubleprivate 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 minSection, int maxSection, Optional<double[]> heights) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddValuesForColumn(int index, ChunkAccess chunk, int blockX, int blockZ) private voidcalculateData(ChunkAccess chunk, Set<Direction8> newSides) private intgetBiomeColumn(ChunkAccess chunk, int blockX, int blockZ) private intgetCellYIndex(int cellY) private intprivate doublegetDensity(double @Nullable [] densityColumn, int cellY) protected doublegetDensity(int cellX, int cellY, int cellZ) private double[]getDensityColumn(ChunkAccess chunk, int x, int z, int height) protected doublegetHeight(int cellX, int cellY, int cellZ) private intgetHeightAtXZ(ChunkAccess chunk, int blockX, int blockZ) private static intgetInsideIndex(int x, int z) private intgetMinY()static @Nullable BlendingDatagetOrUpdateBlendingData(WorldGenRegion region, int chunkX, int chunkZ) private static intgetOutsideIndex(int x, int z) private static intgetX(int index) private static intgetZ(int index) private static booleanisGround(ChunkAccess chunk, BlockPos pos) protected voiditerateBiomes(int minCellX, int quartY, int minCellZ, BlendingData.BiomeConsumer biomeConsumer) protected voiditerateDensities(int minCellX, int minCellZ, int fromCellY, int toCellY, BlendingData.DensityConsumer densityConsumer) protected voiditerateHeights(int minCellX, int minCellZ, BlendingData.HeightConsumer heightConsumer) pack()private intprivate static doubleread1(ChunkAccess chunk, BlockPos.MutableBlockPos pos) private static doubleread7(ChunkAccess chunk, BlockPos.MutableBlockPos pos) static Set<Direction8> sideByGenerationAge(WorldGenLevel region, int chunkX, int chunkZ, boolean wantedOldGen) static @Nullable BlendingDataunpack(@Nullable BlendingData.Packed packed) private static intzeroIfNegative(int value)
-
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
private 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
public static @Nullable BlendingData getOrUpdateBlendingData(WorldGenRegion region, int chunkX, int chunkZ) -
sideByGenerationAge
public static Set<Direction8> sideByGenerationAge(WorldGenLevel region, int chunkX, int chunkZ, boolean wantedOldGen) -
calculateData
-
addValuesForColumn
-
getHeightAtXZ
-
read1
-
read7
-
getDensityColumn
-
getBiomeColumn
-
isGround
-
getHeight
protected double getHeight(int cellX, int cellY, int cellZ) -
getDensity
private double getDensity(double @Nullable [] densityColumn, int cellY) -
getDensity
protected double getDensity(int cellX, int cellY, int cellZ) -
iterateBiomes
protected void iterateBiomes(int minCellX, int quartY, int minCellZ, BlendingData.BiomeConsumer biomeConsumer) -
iterateHeights
protected void iterateHeights(int minCellX, int minCellZ, BlendingData.HeightConsumer heightConsumer) -
iterateDensities
protected void iterateDensities(int minCellX, int minCellZ, int fromCellY, int toCellY, BlendingData.DensityConsumer densityConsumer) -
cellCountPerColumn
private int cellCountPerColumn() -
quartCountPerColumn
private int quartCountPerColumn() -
getColumnMinY
private int getColumnMinY() -
getMinY
private int getMinY() -
getCellYIndex
private int getCellYIndex(int cellY) -
getInsideIndex
private static int getInsideIndex(int x, int z) -
getOutsideIndex
private static int getOutsideIndex(int x, int z) -
getX
private static int getX(int index) -
getZ
private static int getZ(int index) -
zeroIfNegative
private static int zeroIfNegative(int value) -
getAreaWithOldGeneration
-