Class GEOMiner
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.geo.GEOMiner
- All Implemented Interfaces:
EnergyNetComponent,HologramOwner,ItemAttribute,MachineProcessHolder<GEOMiningOperation>,Placeable,RecipeDisplayItem,InventoryBlock
public class GEOMiner
extends SlimefunItem
implements RecipeDisplayItem, EnergyNetComponent, InventoryBlock, HologramOwner, MachineProcessHolder<GEOMiningOperation>
The
GEOMiner is an electrical machine that allows you to obtain a GEOResource.- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionGEOMiner(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconstructMenu(BlockMenuPreset preset) intThis method returns the max amount of electricity this machine can hold.This is the list of items to display alongside thisSlimefunItem.This method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents.intThis method returns the amount of energy that is consumed per operation.int[]This method returns ourMachineProcessorinstance.int[]intgetSpeed()This method returns the speed at which this machine will operate.voidThis method is called beforeSlimefunItem.register(SlimefunAddon).voidregister(SlimefunAddon addon) This method registers thisSlimefunItem.final GEOMinersetCapacity(int capacity) This sets the energy capacity for this machine.final GEOMinersetEnergyConsumption(int energyConsumption) This method sets the energy consumed by this machine per tick.final GEOMinersetProcessingSpeed(int speed) This sets the speed of this machine.protected voidMethods 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, load, postRegister, 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.EnergyNetComponent
addCharge, getCharge, getCharge, isChargeable, removeCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.HologramOwner
getHologramOffset, removeHologram, updateHologramMethods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPresetMethods 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
-
Constructor Details
-
GEOMiner
@ParametersAreNonnullByDefault public GEOMiner(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
getMachineProcessor
Description copied from interface:MachineProcessHolderThis method returns ourMachineProcessorinstance.- Specified by:
getMachineProcessorin interfaceMachineProcessHolder<GEOMiningOperation>- Returns:
- Our
MachineProcessor
-
getCapacity
public int getCapacity()This method returns the max amount of electricity this machine can hold.- Specified by:
getCapacityin interfaceEnergyNetComponent- Returns:
- The max amount of electricity this Block can store.
-
getEnergyConsumption
public int getEnergyConsumption()This method returns the amount of energy that is consumed per operation.- Returns:
- The rate of energy consumption
-
getSpeed
public int getSpeed()This method returns the speed at which this machine will operate. This can be implemented on an instantiation-level to create different tiers of machines.- Returns:
- The speed of this machine
-
setCapacity
This sets the energy capacity for this machine. This method must be called before registering the item and only before registering.- Parameters:
capacity- The amount of energy this machine can store- Returns:
- This method will return the current instance of
GEOMiner, so that can be chained.
-
setProcessingSpeed
This sets the speed of this machine.- Parameters:
speed- The speed multiplier for this machine, must be above zero- Returns:
- This method will return the current instance of
GEOMiner, so that can be chained.
-
setEnergyConsumption
This method sets the energy consumed by this machine per tick.- Parameters:
energyConsumption- The energy consumed per tick- Returns:
- This method will return the current instance of
GEOMiner, so that can be chained.
-
register
Description copied from class:SlimefunItemThis method registers thisSlimefunItem. Always call this method after yourSlimefunItemhas been initialized. Never call it more than once!- Overrides:
registerin classSlimefunItem- Parameters:
addon- TheSlimefunAddonthat thisSlimefunItembelongs to.
-
getInputSlots
@Nonnull public int[] getInputSlots()Description copied from interface:InventoryBlock- Specified by:
getInputSlotsin interfaceInventoryBlock- Returns:
- The input slots for the
Inventoryof this block
-
getOutputSlots
@Nonnull public int[] getOutputSlots()Description copied from interface:InventoryBlock- Specified by:
getOutputSlotsin interfaceInventoryBlock- Returns:
- The output slots for the
Inventoryof this block
-
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- Returns:
- The recipes to display in the
SlimefunGuide
-
getLabelLocalPath
- Specified by:
getLabelLocalPathin interfaceRecipeDisplayItem
-
getEnergyComponentType
Description copied from interface:EnergyNetComponentThis method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents. It describes how this Block will interact with anEnergyNet.- Specified by:
getEnergyComponentTypein interfaceEnergyNetComponent- Returns:
- The
EnergyNetComponentTypethisSlimefunItemrepresents.
-
constructMenu
-
preRegister
public void preRegister()Description copied from class:SlimefunItemThis method is called beforeSlimefunItem.register(SlimefunAddon). Override this method to add any additional setup, adding anItemHandlerfor example.- Overrides:
preRegisterin classSlimefunItem
-
tick
-