Interface EnergyNetProvider
- All Superinterfaces:
EnergyNetComponent,ItemAttribute
- All Known Implementing Classes:
AbstractEnergyProvider,AGenerator,BioGenerator,CoalGenerator,CombustionGenerator,LavaGenerator,MagnesiumGenerator,NetherStarReactor,NuclearReactor,Reactor,SolarGenerator
An
EnergyNetProvider is an extension of EnergyNetComponent which provides
energy to an EnergyNet.
It must be implemented on any Generator or Reactor.- Author:
- TheBusyBiscuit
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault EnergyNetComponentTypeThis method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents.default intgetGeneratedOutput(org.bukkit.Location l, ASlimefunDataContainer data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet.default intgetGeneratedOutput(org.bukkit.Location l, SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.default intgetGeneratedOutput(org.bukkit.Location l, Config data) Deprecated, for removal: This API element is subject to removal in a future version.usegetGeneratedOutputLong(Location, SlimefunBlockData)instead This method only for backward compatibility.default longgetGeneratedOutputLong(org.bukkit.Location l, ASlimefunDataContainer data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet.default longgetGeneratedOutputLong(org.bukkit.Location l, SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.default booleanwillExplode(org.bukkit.Location l, ASlimefunDataContainer data) This method returns whether the givenLocationis going to explode on the next tick.default booleanwillExplode(org.bukkit.Location l, SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.UsewillExplode(Location, ASlimefunDataContainer)insteaddefault booleanwillExplode(org.bukkit.Location l, Config data) Deprecated, for removal: This API element is subject to removal in a future version.usewillExplode(Location, SlimefunBlockData)instead This method only for backward compatibility.Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
addCharge, addCharge, getCapacity, getCapacityLong, getCharge, getCharge, getCharge, getCharge, getChargeLong, getChargeLong, getChargeLong, isChargeable, removeCharge, removeCharge, setCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
-
Method Details
-
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.
-
getGeneratedOutput
@Deprecated(forRemoval=true) default int getGeneratedOutput(@Nonnull org.bukkit.Location l, @Nonnull SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
l-data-- Returns:
-
getGeneratedOutput
default int getGeneratedOutput(@Nonnull org.bukkit.Location l, @Nonnull ASlimefunDataContainer data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet. Stored energy does not have to be handled in here.
if your machine outputs energy values higher than Integer.MAX_VALUE, please return Integer.MAX_VALUE here and overridegetGeneratedOutputLong(Location, SlimefunBlockData)instead.- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The storedSlimefunBlockData- Returns:
- The generated output energy of this
EnergyNetProvider.
-
getGeneratedOutput
@Deprecated(forRemoval=true) default int getGeneratedOutput(@Nonnull org.bukkit.Location l, @Nonnull Config data) Deprecated, for removal: This API element is subject to removal in a future version.usegetGeneratedOutputLong(Location, SlimefunBlockData)instead This method only for backward compatibility.- Parameters:
l-data-- Returns:
-
getGeneratedOutputLong
@Deprecated(forRemoval=true) default long getGeneratedOutputLong(@Nonnull org.bukkit.Location l, @Nonnull SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- The generated output energy of this
EnergyNetProvider.
-
getGeneratedOutputLong
default long getGeneratedOutputLong(@Nonnull org.bukkit.Location l, @Nonnull ASlimefunDataContainer data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet. We call this method every time we tick a energy regulator, so make sure to keep it light and fast. Stored energy does not have to be handled in here.- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- The generated output energy of this
EnergyNetProvider.
-
willExplode
This method returns whether the givenLocationis going to explode on the next tick.- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- Whether or not this
Locationwill explode.
-
willExplode
@Deprecated(forRemoval=true) default boolean willExplode(@Nonnull org.bukkit.Location l, @Nonnull SlimefunBlockData data) Deprecated, for removal: This API element is subject to removal in a future version.UsewillExplode(Location, ASlimefunDataContainer)instead- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- Whether or not this
Locationwill explode.
-
willExplode
@Deprecated(forRemoval=true) default boolean willExplode(@Nonnull org.bukkit.Location l, @Nonnull Config data) Deprecated, for removal: This API element is subject to removal in a future version.usewillExplode(Location, SlimefunBlockData)instead This method only for backward compatibility.- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- Whether or not this
Locationwill explode.
-
getGeneratedOutput(Location, ASlimefunDataContainer)instead