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 EnergyNetComponentType
This method returns the Type ofEnergyNetComponentType
thisSlimefunItem
represents.int
getGeneratedOutput
(Location l, Config data) This method returns how much energy thisEnergyNetProvider
provides to theEnergyNet
.default boolean
willExplode
(Location l, Config data) This method returns whether the givenLocation
is going to explode on the next tick.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.ItemAttribute
getId
-
Method Details
-
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
- Returns:
- The
EnergyNetComponentType
thisSlimefunItem
represents.
-
getGeneratedOutput
This method returns how much energy thisEnergyNetProvider
provides to theEnergyNet
. We call this method on every tick, so make sure to keep it light and fast. Stored energy does not have to be handled in here.- Parameters:
l
- TheLocation
of thisEnergyNetProvider
data
- The stored block data- Returns:
- The generated output energy of this
EnergyNetProvider
.
-
willExplode
This method returns whether the givenLocation
is going to explode on the next tick.- Parameters:
l
- TheLocation
of thisEnergyNetProvider
data
- The stored block data- Returns:
- Whether or not this
Location
will explode.
-