Class HTBasicItemEnergyBattery
-
- All Implemented Interfaces:
-
hiiragi283.core.api.HTContentListener,hiiragi283.core.api.HTContentListener.Empty,hiiragi283.core.api.serialization.value.HTValueSerializable,hiiragi283.core.api.serialization.value.HTValueSerializable.Empty,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 class HTBasicItemEnergyBattery extends HTEnergyBattery.Basic implements HTContentListener.Empty, HTValueSerializable.Empty
-
-
Constructor Summary
Constructors Constructor Description HTBasicItemEnergyBattery(Integer capacity, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert, ItemStack container)
-
Method Summary
Modifier and Type Method Description UnitsetAmount(Integer amount)保持しているリソースの量を変更します。 final UnitsetAmountUnchecked(Integer amount, Boolean validate)IntegergetAmount()保持している量を返します。 IntegergetCapacity()容量を返します。 final static HTBasicItemEnergyBatteryinput(ItemStack container, Integer capacity)final static HTBasicItemEnergyBatteryoutput(ItemStack container, Integer capacity)final static HTBasicItemEnergyBatterycreate(ItemStack container, Integer capacity, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert)-
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
onContentsChanged -
Methods inherited from class hiiragi283.core.api.serialization.value.HTValueSerializable
deserialize, serialize -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTBasicItemEnergyBattery
HTBasicItemEnergyBattery(Integer capacity, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert, ItemStack container)
-
-
Method Detail
-
setAmountUnchecked
final Unit setAmountUnchecked(Integer amount, Boolean validate)
-
getCapacity
Integer getCapacity()
容量を返します。
-
input
final static HTBasicItemEnergyBattery input(ItemStack container, Integer capacity)
-
output
final static HTBasicItemEnergyBattery output(ItemStack container, Integer capacity)
-
create
final static HTBasicItemEnergyBattery create(ItemStack container, Integer capacity, Predicate<HTStorageAccess> canExtract, Predicate<HTStorageAccess> canInsert)
-
-
-
-