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
FieldsFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEnergyProvider(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionThis is the list of items to display alongside thisSlimefunItem.final EnergyNetComponentTypeThis method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents.abstract intThis method returns the amount of energy that is produced per tick.This method returns the title that is used for theInventoryof anAbstractEnergyProviderthat has been opened by a Player.abstract ItemStackThis method returns theItemStackthat thisAGeneratorwill use as a progress bar.protected abstract voidThis method is used to register the default fuel types.voidregisterFuel(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, 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, getCapacity, getCharge, getCharge, isChargeable, removeCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetProvider
getGeneratedOutput, willExplodeMethods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPreset, getInputSlots, getOutputSlotsMethods 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
-
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 theInventoryof anAbstractEnergyProviderthat has been opened by a Player. Override this method to set the title.- Returns:
- The title of the
Inventoryof thisAbstractEnergyProvider
-
getProgressBar
This method returns theItemStackthat thisAGeneratorwill use as a progress bar. Override this method to set the progress bar.- Returns:
- The
ItemStackto 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:EnergyNetComponentThis method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents. It describes how this Block will interact with anEnergyNet.- Specified by:
getEnergyComponentTypein interfaceEnergyNetComponent- Specified by:
getEnergyComponentTypein interfaceEnergyNetProvider- Returns:
- The
EnergyNetComponentTypethisSlimefunItemrepresents.
-
registerFuel
-
getFuelTypes
-
getLabelLocalPath
- Specified by:
getLabelLocalPathin interfaceRecipeDisplayItem
-
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
-