Package etithespirit.orimod.energy
Interface ILightEnergyStorage
- All Known Implementing Classes:
AbstractLightStorageTile
,PersistentLightEnergyStorage
public interface ILightEnergyStorage
An energy system similar to (but purposely not directly compatible with)
Additionally, the mechanics of this storage medium are based off of my custom written lore for Spirit Light.
For other modders, please note:
IEnergyStorage
.
It has a number of unique quirks to it, such as the ability to be affected by the environment.Additionally, the mechanics of this storage medium are based off of my custom written lore for Spirit Light.
For other modders, please note:
- The value of the Luxen (a Light unit) is extremely high. It is not like RF where units in the millions are needed. The default conversion ratio is 5000RF = 1 Luxen for a reason!
- You are advised to work with RF if possible. The only time you should use this class is if you are adding new Light technology. It is strongly recommended to NOT make a device that implements both energy interfaces as to ensure the energy types are meaningfully isolated.
- Respect configs! There is one adapter block included with the mod by default. You should not need to make any more, but if, for some reason, you must? Leverage the user's or server's configs to get the proper conversion ratios.
- Author:
- Eti
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not this storage is a valid candidate for use in theLight Energy Adapter
(for conversion to RF).boolean
Returns if this storage can have energy extracted.boolean
Used to determine if this storage can receive energy.double
extractLight
(double maxExtract, boolean simulate) Removes energy from the storage.double
double
double
receiveLight
(double maxReceive, boolean simulate) Adds energy to the storage.
-
Method Details
-
receiveLight
double receiveLight(double maxReceive, boolean simulate) Adds energy to the storage. Returns quantity of energy that was accepted.- Parameters:
maxReceive
- Maximum amount of energy to be inserted.simulate
- If TRUE, the insertion will only be simulated.- Returns:
- Amount of energy that was (or would have been, if simulated) accepted by the storage.
-
extractLight
double extractLight(double maxExtract, boolean simulate) Removes energy from the storage. Returns quantity of energy that was removed.- Parameters:
maxExtract
- Maximum amount of energy to be extracted.simulate
- If TRUE, the extraction will only be simulated.- Returns:
- Amount of energy that was (or would have been, if simulated) extracted from the storage.
-
getLightStored
double getLightStored()- Returns:
- The amount of energy currently stored.
-
getMaxLightStored
double getMaxLightStored()- Returns:
- The maximum amount of energy that can be stored.
-
canExtractLight
boolean canExtractLight()Returns if this storage can have energy extracted. If this is false, then any calls to extractEnergy will return 0.- Returns:
- Whether or not this storage can have energy extracted from it.
-
canReceiveLight
boolean canReceiveLight()Used to determine if this storage can receive energy. If this is false, then any calls to receiveEnergy will return 0.- Returns:
- Whether or not this storage can have energy added to it.
-
acceptsConversion
boolean acceptsConversion()Whether or not this storage is a valid candidate for use in theLight Energy Adapter
(for conversion to RF).- Returns:
- whether or not this can interact with RF (as opposed to Light), which determines its usability in
LightEnergyAdapter
.
-