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<@Nullable List<@Nullable Holder<Biome>>> biomes
    • densities

      private final transient double[][] densities
  • Constructor Details

    • BlendingData

      private BlendingData(int minSection, int maxSection, Optional<double[]> heights)
  • Method Details

    • unpack

      public static @Nullable BlendingData unpack(@Nullable BlendingData.Packed packed)
    • pack

      public BlendingData.Packed 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

      private void calculateData(ChunkAccess chunk, Set<Direction8> newSides)
    • addValuesForColumn

      private void addValuesForColumn(int index, ChunkAccess chunk, int blockX, int blockZ)
    • getHeightAtXZ

      private int getHeightAtXZ(ChunkAccess chunk, int blockX, int blockZ)
    • read1

      private static double read1(ChunkAccess chunk, BlockPos.MutableBlockPos pos)
    • read7

      private static double read7(ChunkAccess chunk, BlockPos.MutableBlockPos pos)
    • getDensityColumn

      private double[] getDensityColumn(ChunkAccess chunk, int x, int z, int height)
    • getBiomeColumn

      private List<Holder<Biome>> getBiomeColumn(ChunkAccess chunk, int blockX, int blockZ)
    • isGround

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

      public LevelHeightAccessor getAreaWithOldGeneration()