Package wtf.choco.veinminer.pattern
Class PatternUtils
java.lang.Object
wtf.choco.veinminer.pattern.PatternUtils
Utility methods for implementing
VeinMiningPatterns
.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
typeMatches
(@NotNull VeinMinerBlock block, @Nullable BlockList aliasList, @NotNull BlockState current) Check whether or not the givenBlockState
matches either theVeinMinerBlock
or is present in the givenBlockList
.
-
Method Details
-
typeMatches
public static boolean typeMatches(@NotNull @NotNull VeinMinerBlock block, @Nullable @Nullable BlockList aliasList, @NotNull @NotNull BlockState current) Check whether or not the givenBlockState
matches either theVeinMinerBlock
or is present in the givenBlockList
.- Parameters:
block
- the block against which to check the statealiasList
- the alias list, or null if no aliasescurrent
- the current block state to check- Returns:
- true if
current
eithermatches state
with theblock
or iscontained in the alias list
, false otherwise
-