Interface RuleTest
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
AlwaysTrueTest, BlockMatchTest, BlockStateMatchTest, RandomBlockMatchTest, RandomBlockStateMatchTest, TagMatchTest
Rule tests are used to test if a block matches specific conditions.
- Since:
- 2.3.0
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic AlwaysTrueTestMatches any block.static BlockMatchTestblockMatch(Material block) Tests the block is the specified block.static BlockStateMatchTestblockStateMatch(BlockData blockState) Tests is the block for the specifiedBlockData.static BlockStateMatchTestblockStateMatch(Material material) Tests is the block for the specifiedMaterial.static RuleTestReads a Minecraft rule test into a Wyck rule test.static RandomBlockMatchTestrandomBlockMatch(Material block, float probability) Tests the block is the specified block.static RandomBlockStateMatchTestrandomBlockStateMatch(BlockData state, float probability) Tests is the block for the specifiedBlockData.static RandomBlockStateMatchTestrandomBlockStateMatch(Material material, float probability) Tests is the block for the specifiedMaterial.static TagMatchTesttagMatch(ResourceKey tag) Tests if the block is in the specified block tag.static TagMatchTestTests if the block is in the specified block tag.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
alwaysTrue
Matches any block.- Returns:
- the always true test
- Since:
- 2.3.0
-
blockMatch
Tests the block is the specified block.- Parameters:
block- the block to match- Returns:
- the block match test
- Since:
- 2.3.0
-
blockStateMatch
Tests is the block for the specifiedBlockData.- Parameters:
blockState- the block blockState to match- Returns:
- the block blockState match test
- Since:
- 2.3.0
-
blockStateMatch
Tests is the block for the specifiedMaterial.- Parameters:
material- the material to match- Returns:
- the block material match test
- Since:
- 3.0.0
-
tagMatch
Tests if the block is in the specified block tag.- Parameters:
tag- the tag to match- Returns:
- the tag match test
- Since:
- 3.0.0
-
tagMatch
Tests if the block is in the specified block tag.- Parameters:
tag- the tag to match- Returns:
- the tag match test
- Since:
- 2.3.0
-
randomBlockMatch
Tests the block is the specified block. Then only matches with a given probability.- Parameters:
block- the block to matchprobability- the probability of matching- Returns:
- the random block match test
- Since:
- 2.3.0
-
randomBlockStateMatch
@AsOf("2.3.0") static RandomBlockStateMatchTest randomBlockStateMatch(BlockData state, float probability) Tests is the block for the specifiedBlockData. Then only matches with a given probability.- Parameters:
state- the block blockState to matchprobability- the probability of matching- Returns:
- the random block blockState match test
- Since:
- 2.3.0
-
randomBlockStateMatch
@AsOf("3.0.0") static RandomBlockStateMatchTest randomBlockStateMatch(Material material, float probability) Tests is the block for the specifiedMaterial. Then only matches with a given probability.- Parameters:
material- the material to matchprobability- the probability of matching- Returns:
- the random block material match test
- Since:
- 3.0.0
-
decode
-