Class AbstractEnergyProvider
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.electric.AbstractEnergyProvider
- All Implemented Interfaces:
EnergyNetComponent
,EnergyNetProvider
,ItemAttribute
,Placeable
,RecipeDisplayItem
,InventoryBlock
- Direct Known Subclasses:
AGenerator
,Reactor
public abstract class AbstractEnergyProvider
extends SlimefunItem
implements InventoryBlock, RecipeDisplayItem, EnergyNetProvider
This is an abstract super class for machines that produce energy.
- 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
ModifierConstructorDescriptionprotected
AbstractEnergyProvider
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionThis is the list of items to display alongside thisSlimefunItem
.final EnergyNetComponentType
This method returns the Type ofEnergyNetComponentType
thisSlimefunItem
represents.abstract int
This method returns the amount of energy that is produced per tick.This method returns the title that is used for theInventory
of anAbstractEnergyProvider
that has been opened by a Player.abstract ItemStack
This method returns theItemStack
that thisAGenerator
will use as a progress bar.protected abstract void
This method is used to register the default fuel types.void
registerFuel
(MachineFuel fuel) 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, load, postRegister, preRegister, register, 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.EnergyNetComponent
addCharge, getCapacity, getCharge, getCharge, isChargeable, removeCharge, setCharge
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetProvider
getGeneratedOutput, willExplode
Methods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPreset, getInputSlots, getOutputSlots
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
-
fuelTypes
-
-
Constructor Details
-
AbstractEnergyProvider
@ParametersAreNonnullByDefault protected AbstractEnergyProvider(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
getInventoryTitle
This method returns the title that is used for theInventory
of anAbstractEnergyProvider
that has been opened by a Player. Override this method to set the title.- Returns:
- The title of the
Inventory
of thisAbstractEnergyProvider
-
getProgressBar
This method returns theItemStack
that thisAGenerator
will use as a progress bar. Override this method to set the progress bar.- Returns:
- The
ItemStack
to use as the progress bar
-
getEnergyProduction
public abstract int getEnergyProduction()This method returns the amount of energy that is produced per tick.- Returns:
- The rate of energy generation
-
registerDefaultFuelTypes
protected abstract void registerDefaultFuelTypes()This method is used to register the default fuel types. -
getEnergyComponentType
Description copied from interface:EnergyNetComponent
This method returns the Type ofEnergyNetComponentType
thisSlimefunItem
represents. It describes how this Block will interact with anEnergyNet
.- Specified by:
getEnergyComponentType
in interfaceEnergyNetComponent
- Specified by:
getEnergyComponentType
in interfaceEnergyNetProvider
- Returns:
- The
EnergyNetComponentType
thisSlimefunItem
represents.
-
registerFuel
-
getFuelTypes
-
getLabelLocalPath
- Specified by:
getLabelLocalPath
in interfaceRecipeDisplayItem
-
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
- Returns:
- The recipes to display in the
SlimefunGuide
-