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 Details

  • Constructor Details

    • AbstractEnergyProvider

      @ParametersAreNonnullByDefault protected AbstractEnergyProvider(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
  • Method Details

    • getInventoryTitle

      @Nonnull public String getInventoryTitle()
      This method returns the title that is used for the Inventory of an AbstractEnergyProvider that has been opened by a Player. Override this method to set the title.
      Returns:
      The title of the Inventory of this AbstractEnergyProvider
    • getProgressBar

      @Nonnull public abstract org.bukkit.inventory.ItemStack getProgressBar()
      This method returns the ItemStack that this AGenerator 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

      @Nonnull public final EnergyNetComponentType getEnergyComponentType()
      Description copied from interface: EnergyNetComponent
      This method returns the Type of EnergyNetComponentType this SlimefunItem represents. It describes how this Block will interact with an EnergyNet.
      Specified by:
      getEnergyComponentType in interface EnergyNetComponent
      Specified by:
      getEnergyComponentType in interface EnergyNetProvider
      Returns:
      The EnergyNetComponentType this SlimefunItem represents.
    • registerFuel

      public void registerFuel(@Nonnull MachineFuel fuel)
    • getFuelTypes

      @Nonnull public Set<MachineFuel> getFuelTypes()
    • getLabelLocalPath

      public String getLabelLocalPath()
      Specified by:
      getLabelLocalPath in interface RecipeDisplayItem
    • getDisplayRecipes

      public List<org.bukkit.inventory.ItemStack> getDisplayRecipes()
      Description copied from interface: RecipeDisplayItem
      This is the list of items to display alongside this SlimefunItem. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your input ItemStack and then your output ItemStack.
      Specified by:
      getDisplayRecipes in interface RecipeDisplayItem
      Returns:
      The recipes to display in the SlimefunGuide