Class TreeDetectionService

java.lang.Object
com.zetaplugins.timberz.service.TreeDetectionService

public final class TreeDetectionService extends Object
  • Constructor Details

    • TreeDetectionService

      public TreeDetectionService(TimberZ plugin)
  • Method Details

    • fetchLogToLeaveMap

      public void fetchLogToLeaveMap()
      Fetches the log-to-leaf mapping from the configuration file.
    • identifyTreeStructure

      public Set<org.bukkit.block.Block> identifyTreeStructure(org.bukkit.block.Block sourceBlock)
      Core algorithm to identify a complete tree structure from a source log block.
      Parameters:
      sourceBlock - The log block that was broken by a player
      Returns:
      A set of all blocks that make up the tree, or empty set if not a valid tree
    • containsLog

      public boolean containsLog(org.bukkit.Material blockType)
    • getLeafType

      public org.bukkit.Material getLeafType(org.bukkit.Material logType)
      Get the corresponding leaf type for a log type