Class HTVariableEnergyBattery
-
- All Implemented Interfaces:
-
hiiragi283.core.api.HTContentListener,hiiragi283.core.api.serialization.value.HTValueSerializable,hiiragi283.core.api.storage.amount.HTAmountSlot,hiiragi283.core.api.storage.amount.HTAmountView,hiiragi283.core.api.storage.energy.HTEnergyBattery,java.lang.Runnable,net.neoforged.neoforge.common.util.INBTSerializable
public final class HTVariableEnergyBattery extends HTBasicEnergyBattery
-
-
Constructor Summary
Constructors Constructor Description HTVariableEnergyBattery(IntSupplier capacitySupplier, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert, HTContentListener listener)
-
Method Summary
Modifier and Type Method Description IntegergetCapacity()final static HTBasicEnergyBatterycreate(HTContentListener listener, IntSupplier capacity)final static HTBasicEnergyBatteryinput(HTContentListener listener, IntSupplier capacity)final static HTBasicEnergyBatteryoutput(HTContentListener listener, IntSupplier capacity)-
Methods inherited from class hiiragi283.core.common.storage.energy.HTBasicEnergyBattery
deserialize, getAmount, onContentsChanged, serialize, setAmount, setAmountUnchecked -
Methods inherited from class hiiragi283.core.api.storage.energy.HTEnergyBattery.Basic
toString -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountSlot.Basic
extract, insert -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView
getLevelAsFloat, getLevelAsFraction, getNeeded, isEmpty -
Methods inherited from class hiiragi283.core.api.HTContentListener
run -
Methods inherited from class hiiragi283.core.api.serialization.value.HTValueSerializable
deserializeNBT, serializeNBT -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTVariableEnergyBattery
HTVariableEnergyBattery(IntSupplier capacitySupplier, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert, HTContentListener listener)
-
-
Method Detail
-
getCapacity
Integer getCapacity()
-
create
final static HTBasicEnergyBattery create(HTContentListener listener, IntSupplier capacity)
-
input
final static HTBasicEnergyBattery input(HTContentListener listener, IntSupplier capacity)
-
output
final static HTBasicEnergyBattery output(HTContentListener listener, IntSupplier capacity)
-
-
-
-