Class ScatteredOreFeature

java.lang.Object
net.minecraft.world.level.levelgen.feature.Feature<OreConfiguration>
net.minecraft.world.level.levelgen.feature.ScatteredOreFeature

public class ScatteredOreFeature extends Feature<OreConfiguration>
  • Field Details

  • Constructor Details

    • ScatteredOreFeature

      ScatteredOreFeature(com.mojang.serialization.Codec<OreConfiguration> p_160304_)
  • Method Details

    • place

      public boolean place(FeaturePlaceContext<OreConfiguration> pContext)
      Places the given feature at the given location. During world generation, features are provided with a 3x3 region of chunks, centered on the chunk being generated, that they can safely generate into.
      Specified by:
      place in class Feature<OreConfiguration>
      Parameters:
      pContext - A context object with a reference to the level and the position the feature is being placed at
    • offsetTargetPos

      private void offsetTargetPos(BlockPos.MutableBlockPos pMutablePos, RandomSource pRandom, BlockPos pPos, int pMagnitude)
    • getRandomPlacementInOneAxisRelativeToOrigin

      private int getRandomPlacementInOneAxisRelativeToOrigin(RandomSource pRandom, int pMagnitude)