Class HTEnergyBattery.Basic
-
- All Implemented Interfaces:
-
hiiragi283.core.api.HTContentListener,hiiragi283.core.api.serialization.value.HTValueSerializable,hiiragi283.core.api.storage.amount.HTAmountSlot,hiiragi283.core.api.storage.amount.HTAmountSlot.IntSized,hiiragi283.core.api.storage.amount.HTAmountView,hiiragi283.core.api.storage.amount.HTAmountView.IntSized,hiiragi283.core.api.storage.energy.HTEnergyBattery,java.lang.Runnable,net.neoforged.neoforge.common.util.INBTSerializable
public abstract class HTEnergyBattery.Basic implements HTEnergyBattery
HTEnergyBatteryの基本的な実装クラスです。
- Since:
0.1.0
Hiiragi Tsubasa
-
-
Constructor Summary
Constructors Constructor Description HTEnergyBattery.Basic()
-
Method Summary
Modifier and Type Method Description abstract UnitsetAmount(Integer amount)指定したamountで中身を置換します。 Integerinsert(Integer amount, HTStorageAction action, HTStorageAccess access)このスロットに量を搬入します。 Integerextract(Integer amount, HTStorageAction action, HTStorageAccess access)このスロットから量を搬出します。 StringtoString()-
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountSlot.IntSized
isEmpty -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView.IntSized
getNeeded, getStoredLevel -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView
getAmount, getCapacity -
Methods inherited from class hiiragi283.core.api.serialization.value.HTValueSerializable
deserialize, serialize -
Methods inherited from class hiiragi283.core.api.HTContentListener
onContentsChanged -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
insert
Integer insert(Integer amount, HTStorageAction action, HTStorageAccess access)
このスロットに量を搬入します。
- Returns:
搬入される量
-
extract
Integer extract(Integer amount, HTStorageAction action, HTStorageAccess access)
このスロットから量を搬出します。
- Returns:
搬出される量
-
-
-
-