All Implemented Interfaces:
ItemAttribute, NotPlaceable, Placeable, RecipeDisplayItem
Direct Known Subclasses:
AdvancedIndustrialMiner

public class IndustrialMiner extends MultiBlockMachine
The IndustrialMiner is a MultiBlockMachine that can mine any ores it finds in a given range underneath where it was placed. And for those of you who are wondering... yes this is the replacement for the long-time deprecated Digital Miner.
Author:
TheBusyBiscuit
See Also:
  • Field Details

    • activeMiners

      protected final Map<Location,io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.miner.MiningTask> activeMiners
    • fuelTypes

      protected final List<MachineFuel> fuelTypes
  • Constructor Details

    • IndustrialMiner

      @ParametersAreNonnullByDefault public IndustrialMiner(ItemGroup itemGroup, SlimefunItemStack item, Material baseMaterial, boolean silkTouch, int range)
  • Method Details

    • hasSilkTouch

      public boolean hasSilkTouch()
      This returns whether this IndustrialMiner will output ores as they are. Similar to the Silk Touch Enchantment.
      Returns:
      Whether to treat ores with Silk Touch
    • getRange

      public int getRange()
      This method returns the range of the IndustrialMiner. The total area will be determined by the range multiplied by 2 plus the actual center of the machine. So a range of 3 will make the IndustrialMiner affect an area of 7x7 blocks. 3 on all axis, plus the center of the machine itself.
      Returns:
      The range of this IndustrialMiner
    • registerDefaultFuelTypes

      protected void registerDefaultFuelTypes()
      This registers the various types of fuel that can be used in the IndustrialMiner.
    • getOutcome

      @Nonnull public ItemStack getOutcome(@Nonnull Material material)
      This method returns the outcome that mining certain ores yields.
      Parameters:
      material - The Material of the ore that was mined
      Returns:
      The outcome when mining this ore
    • addFuelType

      public void addFuelType(int ores, @Nonnull ItemStack item)
      This registers a new fuel type for this IndustrialMiner.
      Parameters:
      ores - The amount of ores this allows you to mine
      item - The item that shall be consumed
    • getLabelLocalPath

      @Nonnull public String getLabelLocalPath()
    • getDisplayRecipes

      @Nonnull public List<ItemStack> getDisplayRecipes()
      Description copied from interface: RecipeDisplayItem
      This is the list of items to display alongside this SlimefunItem. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your input ItemStack and then your output ItemStack.
      Specified by:
      getDisplayRecipes in interface RecipeDisplayItem
      Overrides:
      getDisplayRecipes in class MultiBlockMachine
      Returns:
      The recipes to display in the SlimefunGuide
    • onInteract

      public void onInteract(Player p, Block b)
      Specified by:
      onInteract in class MultiBlockMachine
    • canMine

      public boolean canMine(@Nonnull Block block)
      This returns whether this IndustrialMiner can mine the given Block.
      Parameters:
      block - The Block to check
      Returns:
      Whether this IndustrialMiner is capable of mining this Block