- All Implemented Interfaces:
public final class PatternThorough extends Object implements VeinMiningPattern
VeinMiningPatternimplementation that "pulsates" from the origin outwards. Every iteration, every block starting from the origin will be checks for adjacent blocks.
This pattern is less efficient than
PatternExpansive when used for larger veins, but
may be more performant when dealing with smaller veins.
This pattern should be considered as effectively deprecated. While not literally deprecated, the expansive pattern should be used in place of this as it will yield results more quickly and in an efficient manner.
- Parker Hawke - 2008Choco
Modifier and Type Method Description
allocateBlocks(Set<org.bukkit.block.Block> blocks, VeinBlock type, org.bukkit.block.Block origin, ToolCategory category, ToolTemplate toolTemplate, AlgorithmConfig algorithmConfig, MaterialAlias alias)Allocate the blocks that should be broken by the vein mining pattern.
get()Get a singleton instance of the default pattern.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void allocateBlocks(Set<org.bukkit.block.Block> blocks, VeinBlock type, org.bukkit.block.Block origin, ToolCategory category, ToolTemplate toolTemplate, AlgorithmConfig algorithmConfig, MaterialAlias alias)Description copied from interface:
VeinMiningPatternAllocate the blocks that should be broken by the vein mining pattern. Note that the breaking of the blocks should not be handled by the pattern, but rather the plugin itself. This method serves primarily to search for valid blocks to break in a vein.
NOTE: If null is added to the "blocks" set, a NullPointerException will be thrown and the method will fail.
- Specified by:
blocks- a set of all blocks to break. Valid blocks should be added here. The "origin" block passed to this method will be added automatically
type- the type of VeinBlock being vein mined
origin- the block where the vein mine was initiated
category- the tool category used to break the block
toolTemplate- the tool template used to break the block. May be null
algorithmConfig- the algorithm configuration
alias- an alias of the block being broken if one exists. May be null
public org.bukkit.NamespacedKey getKey()
- Specified by:
public static PatternThorough get()Get a singleton instance of the default pattern.
- the default pattern