Interface VeinMiningPattern

All Superinterfaces:
org.bukkit.Keyed
All Known Implementing Classes:
PatternExpansive, PatternThorough

public interface VeinMiningPattern
extends org.bukkit.Keyed
Represents a mining algorithm capable of allocating which blocks should be broken by VeinMiner when a successful vein mine occurs. It is recommended that implementations of VeinMiningPattern are singleton instances, although this is not a requirement.
  • Method Summary

    Modifier and Type Method Description
    default void allocateBlocks​(@NotNull Set<org.bukkit.block.Block> blocks, @NotNull VeinBlock type, @NotNull org.bukkit.block.Block origin, @NotNull ToolCategory category, @Nullable ToolTemplate template, @NotNull AlgorithmConfig algorithmConfig)
    Allocate the blocks that should be broken by the vein mining pattern.
    void allocateBlocks​(@NotNull Set<org.bukkit.block.Block> blocks, @NotNull VeinBlock type, @NotNull org.bukkit.block.Block origin, @NotNull ToolCategory category, @Nullable ToolTemplate template, @NotNull AlgorithmConfig algorithmConfig, @Nullable MaterialAlias alias)
    Allocate the blocks that should be broken by the vein mining pattern.

    Methods inherited from interface org.bukkit.Keyed

    getKey
  • Method Details

    • allocateBlocks

      void allocateBlocks​(@NotNull @NotNull Set<org.bukkit.block.Block> blocks, @NotNull @NotNull VeinBlock type, @NotNull @NotNull org.bukkit.block.Block origin, @NotNull @NotNull ToolCategory category, @Nullable @Nullable ToolTemplate template, @NotNull @NotNull AlgorithmConfig algorithmConfig, @Nullable @Nullable MaterialAlias alias)
      Allocate 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.

      Parameters:
      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
      template - 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
    • allocateBlocks

      default void allocateBlocks​(@NotNull @NotNull Set<org.bukkit.block.Block> blocks, @NotNull @NotNull VeinBlock type, @NotNull @NotNull org.bukkit.block.Block origin, @NotNull @NotNull ToolCategory category, @Nullable @Nullable ToolTemplate template, @NotNull @NotNull AlgorithmConfig algorithmConfig)
      Allocate 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.

      Parameters:
      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
      template - the tool template used to break the block. May be null
      algorithmConfig - the algorithm configuration