Class BlendingData

java.lang.Object
net.minecraft.world.level.levelgen.blending.BlendingData

public class BlendingData extends Object
  • 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

      private final LevelHeightAccessor areaWithOldGeneration
    • SURFACE_BLOCKS

      private static final List<Block> SURFACE_BLOCKS
    • NO_VALUE

      protected static final double NO_VALUE
      See Also:
    • hasCalculatedData

      private boolean hasCalculatedData
    • heights

      private final double[] heights
    • biomes

      private final List<List<Holder<Biome>>> biomes
    • densities

      private final transient double[][] densities
    • DOUBLE_ARRAY_CODEC

      private static final com.mojang.serialization.Codec<double[]> DOUBLE_ARRAY_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<BlendingData> CODEC
  • Constructor Details

    • BlendingData

      private BlendingData(int p_224740_, int p_224741_, Optional<double[]> p_224742_)
  • Method Details

    • validateArraySize

      private static com.mojang.serialization.DataResult<BlendingData> validateArraySize(BlendingData p_190321_)
    • 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

      private void calculateData(ChunkAccess pChunk, Set<Direction8> pDirections)
    • addValuesForColumn

      private void addValuesForColumn(int pIndex, ChunkAccess pChunk, int pX, int pZ)
    • getHeightAtXZ

      private int getHeightAtXZ(ChunkAccess pChunk, int pX, int pZ)
    • read1

      private static double read1(ChunkAccess pChunk, BlockPos.MutableBlockPos pPos)
    • read7

      private static double read7(ChunkAccess pChunk, BlockPos.MutableBlockPos pPos)
    • getDensityColumn

      private double[] getDensityColumn(ChunkAccess pChunk, int pX, int pZ, int pHeight)
    • getBiomeColumn

      private List<Holder<Biome>> getBiomeColumn(ChunkAccess pChunk, int pX, int pZ)
    • isGround

      private static boolean isGround(ChunkAccess pChunk, BlockPos pPos)
    • 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

      protected void iterateBiomes(int pX, int pY, int pZ, BlendingData.BiomeConsumer pConsumer)
    • iterateHeights

      protected void iterateHeights(int pX, int pZ, BlendingData.HeightConsumer pConsumer)
    • 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

      public LevelHeightAccessor getAreaWithOldGeneration()