Class IndustrialMiner
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine
io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.miner.IndustrialMiner
- All Implemented Interfaces:
ItemAttribute
,NotPlaceable
,Placeable
,RecipeDisplayItem
- Direct Known Subclasses:
AdvancedIndustrialMiner
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:
-
AdvancedIndustrialMiner
MiningTask
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<Location,
io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.miner.MiningTask> protected final List<MachineFuel>
Fields inherited from class io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine
displayRecipes, multiblock, recipes
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ConstructorDescriptionIndustrialMiner
(ItemGroup itemGroup, SlimefunItemStack item, Material baseMaterial, boolean silkTouch, int range) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFuelType
(int ores, ItemStack item) This registers a new fuel type for thisIndustrialMiner
.boolean
This returns whether thisIndustrialMiner
can mine the givenBlock
.This is the list of items to display alongside thisSlimefunItem
.getOutcome
(Material material) This method returns the outcome that mining certain ores yields.int
getRange()
This method returns the range of theIndustrialMiner
.boolean
This returns whether thisIndustrialMiner
will output ores as they are.void
onInteract
(Player p, Block b) protected void
This registers the various types of fuel that can be used in theIndustrialMiner
.Methods inherited from class io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine
addRecipe, findOutputInventory, findOutputInventory, getInteractionHandler, getMultiBlock, getRecipes, handleCraftedItem, load, postRegister, register, registerDefaultRecipes
Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, callItemHandler, canUse, equals, error, getAddon, getBlockTicker, getById, getByItem, getDrops, getDrops, getHandlers, getId, getItem, getItemGroup, getItemName, getItemSetting, getItemSettings, getOptionalById, getOptionalByItem, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, preRegister, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem
getRecipeSectionLabel
-
Field Details
-
activeMiners
-
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 thisIndustrialMiner
will output ores as they are. Similar to the Silk TouchEnchantment
.- Returns:
- Whether to treat ores with Silk Touch
-
getRange
public int getRange()This method returns the range of theIndustrialMiner
. 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 theIndustrialMiner
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 theIndustrialMiner
. -
getOutcome
This method returns the outcome that mining certain ores yields.- Parameters:
material
- TheMaterial
of the ore that was mined- Returns:
- The outcome when mining this ore
-
addFuelType
This registers a new fuel type for thisIndustrialMiner
.- Parameters:
ores
- The amount of ores this allows you to mineitem
- The item that shall be consumed
-
getLabelLocalPath
-
getDisplayRecipes
Description copied from interface:RecipeDisplayItem
This is the list of items to display alongside thisSlimefunItem
. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your inputItemStack
and then your outputItemStack
.- Specified by:
getDisplayRecipes
in interfaceRecipeDisplayItem
- Overrides:
getDisplayRecipes
in classMultiBlockMachine
- Returns:
- The recipes to display in the
SlimefunGuide
-
onInteract
- Specified by:
onInteract
in classMultiBlockMachine
-
canMine
This returns whether thisIndustrialMiner
can mine the givenBlock
.- Parameters:
block
- TheBlock
to check- Returns:
- Whether this
IndustrialMiner
is capable of mining thisBlock
-