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.intgetGeneratedOutput(Location l, Config data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet.default booleanwillExplode(Location l, Config data) This method returns whether the givenLocationis going to explode on the next tick.Methods 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.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
This method returns how much energy thisEnergyNetProviderprovides 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- 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.
-