Package wtf.choco.veinminer.pattern
Class VeinMiningPatternTunnel
java.lang.Object
wtf.choco.veinminer.pattern.VeinMiningPatternTunnel
- All Implemented Interfaces:
VeinMiningPattern
A tunnel
VeinMiningPattern
that mines a square tunnel in a direction.-
Constructor Summary
ConstructorDescriptionConstruct a newVeinMiningPatternTunnel
with the default tunnel radius of 1.VeinMiningPatternTunnel
(int radius) Construct a newVeinMiningPatternTunnel
. -
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.@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
-
Constructor Details
-
VeinMiningPatternTunnel
public VeinMiningPatternTunnel(int radius) Construct a newVeinMiningPatternTunnel
.- Parameters:
radius
- the radius of the tunnel in blocks (excluding the center block).
-
VeinMiningPatternTunnel
public VeinMiningPatternTunnel()Construct a newVeinMiningPatternTunnel
with the default tunnel radius of 1.
-
-
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
-