Interface OreConfiguration

All Superinterfaces:
FeatureConfiguration, Wrapper

@NullMarked @AsOf("3.0.0") public interface OreConfiguration extends FeatureConfiguration
A feature consisting of a natural deposit of ores or other blocks in the ground.
Since:
3.0.0
See Also:
  • Method Details

    • targetStates

      @AsOf("3.0.0") List<OreConfiguration.TargetBlockState> targetStates()
      A list of targets.
      Returns:
      the list of targets
      Since:
      3.0.0
    • size

      @AsOf("3.0.0") int size()
      Determines the size of the ore vein between 0 and 64.
      Returns:
      the size of the ore vein
      Since:
      3.0.0
      See Also:
    • discardChanceOnAirExposure

      @AsOf("3.0.0") float discardChanceOnAirExposure()
      The chance for the entire ore vein to be discarded if any constituent block is adjacent to an air block between 0.0 and 1.0. Other non-solid blocks such as water do not count.
      Returns:
      the discard chance
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default OreConfiguration.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static OreConfiguration of(List<OreConfiguration.TargetBlockState> targetStates, int size, float discardChanceOnAirExposure)
      Creates a new ore configuration.
      Parameters:
      targetStates - the list of targets
      size - the size of the ore vein
      discardChanceOnAirExposure - the discard chance
      Returns:
      a new ore configuration
      Since:
      3.0.0
    • target

      @AsOf("3.0.0") static OreConfiguration.TargetBlockState target(RuleTest target, BlockData state)
      Creates a new target block state.
      Parameters:
      target - the target rule test
      state - the block state
      Returns:
      a new target block state
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static OreConfiguration.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0