Interface RandomBlockStateMatchTest

All Superinterfaces:
RuleTest, Wrapper

@NullMarked @AsOf("3.0.0") public interface RandomBlockStateMatchTest extends RuleTest
Tests is the block for the specified BlockData. Then only matches with a given probability.
Since:
3.0.0
See Also:
  • Method Details

    • blockState

      @AsOf("3.0.0") BlockData blockState()
      The block state to match.
      Returns:
      the block state
      Since:
      3.0.0
    • probability

      @AsOf("3.0.0") float probability()
      The probability of matching between 0.0 and 1.0.
      Returns:
      the probability
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static RandomBlockStateMatchTest of(BlockData blockState, float probability)
      Creates a new random block state match test.
      Parameters:
      blockState - the block state to match
      probability - the probability of matching
      Returns:
      the random block state match test
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static RandomBlockStateMatchTest of(Material material, float probability)
      Creates a new random block state match test.
      Parameters:
      material - the material to match
      probability - the probability of matching
      Returns:
      the random block state match test
      Since:
      3.0.0