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:
-
AdvancedIndustrialMinerMiningTask
-
Field Summary
FieldsModifier 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, recipesFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionIndustrialMiner(ItemGroup itemGroup, SlimefunItemStack item, Material baseMaterial, boolean silkTouch, int range) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFuelType(int ores, ItemStack item) This registers a new fuel type for thisIndustrialMiner.booleanThis returns whether thisIndustrialMinercan 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.intgetRange()This method returns the range of theIndustrialMiner.booleanThis returns whether thisIndustrialMinerwill output ores as they are.voidonInteract(Player p, Block b) protected voidThis 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, registerDefaultRecipesMethods 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, warnMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getIdMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreakingMethods 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 thisIndustrialMinerwill 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 theIndustrialMineraffect 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- TheMaterialof 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:RecipeDisplayItemThis 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 inputItemStackand then your outputItemStack.- Specified by:
getDisplayRecipesin interfaceRecipeDisplayItem- Overrides:
getDisplayRecipesin classMultiBlockMachine- Returns:
- The recipes to display in the
SlimefunGuide
-
onInteract
- Specified by:
onInteractin classMultiBlockMachine
-
canMine
This returns whether thisIndustrialMinercan mine the givenBlock.- Parameters:
block- TheBlockto check- Returns:
- Whether this
IndustrialMineris capable of mining thisBlock
-