Class MaterialRuleContext

java.lang.Object
net.minecraft.world.level.levelgen.material.MaterialRuleContext

public final class MaterialRuleContext extends Object
  • Field Details

    • HOW_FAR_BELOW_PRELIMINARY_SURFACE_LEVEL_TO_BUILD_SURFACE

      private static final int HOW_FAR_BELOW_PRELIMINARY_SURFACE_LEVEL_TO_BUILD_SURFACE
      See Also:
    • system

      private final MaterialSystem system
    • randomState

      private final RandomState randomState
    • expectedVolume

      private final DensityVolume expectedVolume
    • densitySamplers

      private final DensitySamplerSet densitySamplers
    • biomeGetter

      private final Function<BlockPos, Holder<Biome>> biomeGetter
    • context

      private final WorldGenerationContext context
    • possibleBiomes

      private final @Nullable Set<Holder<Biome>> possibleBiomes
    • preliminarySurfaceVolume

      private final DensityVolume preliminarySurfaceVolume
    • preliminarySurfaceBuffer

      private @Nullable DensityBuffer preliminarySurfaceBuffer
    • noiseSamplers2d

      private final Map<ResourceKey<NormalNoise>, DoubleSupplier> noiseSamplers2d
    • noiseSamplers3d

      private final Map<ResourceKey<NormalNoise>, DoubleSupplier> noiseSamplers3d
    • lastUpdateXZ

      private long lastUpdateXZ
    • blockX

      private int blockX
    • blockZ

      private int blockZ
    • surfaceGradientX

      private int surfaceGradientX
    • surfaceGradientZ

      private int surfaceGradientZ
    • surfaceDepth

      private int surfaceDepth
    • lastSurfaceDepth2Update

      private long lastSurfaceDepth2Update
    • surfaceSecondary

      private double surfaceSecondary
    • lastMinSurfaceLevelUpdate

      private long lastMinSurfaceLevelUpdate
    • minSurfaceLevel

      private int minSurfaceLevel
    • lastUpdateY

      private long lastUpdateY
    • pos

      private final BlockPos.MutableBlockPos pos
    • biome

      private @Nullable Holder<Biome> biome
    • blockY

      private int blockY
    • waterHeight

      private int waterHeight
    • stoneDepthBelow

      private int stoneDepthBelow
    • stoneDepthAbove

      private int stoneDepthAbove
  • Constructor Details

  • Method Details

    • updateXZ

      void updateXZ(int blockX, int blockZ, int surfaceGradientX, int surfaceGradientZ)
    • updateY

      void updateY(int stoneDepthAbove, int stoneDepthBelow, int waterHeight, int blockY)
    • getSurfaceSecondary

      public double getSurfaceSecondary()
    • getBiome

      public Holder<Biome> getBiome()
    • getSeaLevel

      public int getSeaLevel()
    • getMinSurfaceLevel

      public int getMinSurfaceLevel()
    • getNoiseSampler

      public DoubleSupplier getNoiseSampler(ResourceKey<NormalNoise> noiseId, boolean is3d)
    • createNoiseSampler2d

      private DoubleSupplier createNoiseSampler2d(ResourceKey<NormalNoise> noiseId)
    • createNoiseSampler3d

      private DoubleSupplier createNoiseSampler3d(ResourceKey<NormalNoise> noiseId)
    • getOrCreateRandomFactory

      public PositionalRandomFactory getOrCreateRandomFactory(Identifier name)
    • getDensitiesInChunk

      public MaterialRules.DensityGetter getDensitiesInChunk(DensityFunction function, boolean prefill)
    • possibleBiomes

      public @Nullable Set<Holder<Biome>> possibleBiomes()
    • stoneDepthAbove

      public int stoneDepthAbove()
    • stoneDepthBelow

      public int stoneDepthBelow()
    • surfaceDepth

      public int surfaceDepth()
    • waterHeight

      public int waterHeight()
    • blockX

      public int blockX()
    • blockY

      public int blockY()
    • blockZ

      public int blockZ()
    • blockPos

      public BlockPos blockPos()
    • surfaceGradientX

      public int surfaceGradientX()
    • surfaceGradientZ

      public int surfaceGradientZ()
    • resolveAnchorY

      public int resolveAnchorY(VerticalAnchor anchor)
    • getBand

      public BlockState getBand(int x, int y, int z)