Package wtf.choco.veinminer.block
Class VeinMinerBlockWildcard
java.lang.Object
wtf.choco.veinminer.block.VeinMinerBlockWildcard
- All Implemented Interfaces:
Comparable<VeinMinerBlock>
,VeinMinerBlock
A type of
VeinMinerBlock
that passes all states and types.-
Field Summary
Fields inherited from interface wtf.choco.veinminer.block.VeinMinerBlock
WILDCARD
-
Method Summary
Modifier and TypeMethodDescription@NotNull BlockState
getState()
Get theBlockState
represented by this block.@NotNull BlockType
getType()
Get theBlockType
represented by this block.boolean
hasState()
Check whether or not this block has at least one state set.boolean
matchesState
(@NotNull BlockState state, boolean exact) Check whether or not thisVeinMinerBlock
matches the givenBlockState
.boolean
matchesType
(@NotNull BlockType type) Check whether or not thisVeinMinerBlock
matches the givenBlockType
.@NotNull String
Get thisVeinMinerBlock
as a state string.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface wtf.choco.veinminer.block.VeinMinerBlock
compareTo, matchesState
-
Method Details
-
getType
Description copied from interface:VeinMinerBlock
Get theBlockType
represented by this block.- Specified by:
getType
in interfaceVeinMinerBlock
- Returns:
- the type
-
getState
Description copied from interface:VeinMinerBlock
Get theBlockState
represented by this block.If this block has no state (e.g.
VeinMinerBlock.hasState()
isfalse
), this method should return a state with default block state values.- Specified by:
getState
in interfaceVeinMinerBlock
- Returns:
- the state
-
hasState
public boolean hasState()Description copied from interface:VeinMinerBlock
Check whether or not this block has at least one state set.- Specified by:
hasState
in interfaceVeinMinerBlock
- Returns:
- true if a state is set, false otherwise
-
matchesType
Description copied from interface:VeinMinerBlock
Check whether or not thisVeinMinerBlock
matches the givenBlockType
.- Specified by:
matchesType
in interfaceVeinMinerBlock
- Parameters:
type
- the type to check- Returns:
- true if this block matches the given type, false otherwise
-
matchesState
Description copied from interface:VeinMinerBlock
Check whether or not thisVeinMinerBlock
matches the givenBlockState
.- Specified by:
matchesState
in interfaceVeinMinerBlock
- Parameters:
state
- the state to checkexact
- whether or not to match against all states- Returns:
- true if matches, false otherwise
-
toStateString
Description copied from interface:VeinMinerBlock
Get thisVeinMinerBlock
as a state string.- Specified by:
toStateString
in interfaceVeinMinerBlock
- Returns:
- the state string
-
toString
-