Package wtf.choco.veinminer.pattern
Class VeinMiningPatternDefault
java.lang.Object
wtf.choco.veinminer.pattern.VeinMiningPatternDefault
- All Implemented Interfaces:
VeinMiningPattern
The default
VeinMiningPattern
that mines as many blocks in an arbitrary pattern
as possible.-
Method Summary
Modifier and TypeMethodDescription@NotNull Set<BlockPosition>
allocateBlocks
(@NotNull BlockAccessor blockAccessor, @NotNull BlockPosition origin, @NotNull BlockFace destroyedFace, @NotNull VeinMinerBlock block, @NotNull VeinMiningConfig config, @Nullable BlockList aliasList) Allocate allBlockPositions
that should be mined according to the input values.static @NotNull VeinMiningPattern
Get the singleton instance ofVeinMiningPatternDefault
.@NotNull NamespacedKey
getKey()
Get theNamespacedKey
of this pattern.@Nullable String
Get the permission node required to use this pattern.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface wtf.choco.veinminer.pattern.VeinMiningPattern
allocateBlocks
-
Method Details
-
getKey
Description copied from interface:VeinMiningPattern
Get theNamespacedKey
of this pattern.- Specified by:
getKey
in interfaceVeinMiningPattern
- Returns:
- the key
-
allocateBlocks
@NotNull public @NotNull Set<BlockPosition> allocateBlocks(@NotNull @NotNull BlockAccessor blockAccessor, @NotNull @NotNull BlockPosition origin, @NotNull @NotNull BlockFace destroyedFace, @NotNull @NotNull VeinMinerBlock block, @NotNull @NotNull VeinMiningConfig config, @Nullable @Nullable BlockList aliasList) Description copied from interface:VeinMiningPattern
Allocate allBlockPositions
that should be mined according to the input values.- Specified by:
allocateBlocks
in interfaceVeinMiningPattern
- Parameters:
blockAccessor
- the block accessororigin
- the position at which the vein mining was initiateddestroyedFace
- the face on which the block was destroyedblock
- the type ofVeinMinerBlock
that was broken at the originconfig
- the configuration applicable for this instance of vein miningaliasList
- aBlockList
of all blocks that should also be considered. May be empty- Returns:
- the allocated block positions
-
getPermission
Description copied from interface:VeinMiningPattern
Get the permission node required to use this pattern.- Specified by:
getPermission
in interfaceVeinMiningPattern
- Returns:
- the permission node, or null if none
-
getInstance
Get the singleton instance ofVeinMiningPatternDefault
.- Returns:
- this pattern instance
-