Interface RandomBlockMatchTest

All Superinterfaces:
RuleTest, Wrapper

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

    • block

      @AsOf("3.0.0") Material block()
      The block to match.
      Returns:
      the block
      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 RandomBlockMatchTest of(Material block, float probability)
      Creates a new random block match test.
      Parameters:
      block - the block to match
      probability - the probability of matching
      Returns:
      the random block match test
      Since:
      3.0.0