Package hiiragi283.lib.transfer
Interface HTResourceSlot
-
- All Implemented Interfaces:
-
hiiragi283.lib.transfer.HTResourceView,net.neoforged.neoforge.common.util.ValueIOSerializable
public interface HTResourceSlot<RESOURCE extends Resource> implements HTResourceView<RESOURCE>, ValueIOSerializable
リソースを搬入/搬出できることを表すインターフェースです。
- Since:
0.1.0
Hiiragi Tsubasa
-
-
Method Summary
Modifier and Type Method Description abstract BooleanisValid(RESOURCE resource)abstract Integerinsert(RESOURCE resource, Integer amount, TransactionContext transaction, HTHandlerAccess access)abstract Integerextract(RESOURCE resource, Integer amount, TransactionContext transaction, HTHandlerAccess access)abstract RESOURCEgetResource()abstract LonggetAmountAsLong()IntegergetAmountAsInt()-
Methods inherited from class hiiragi283.lib.transfer.HTResourceView
getCapacityAsInt, getCapacityAsLong, getCurrentCapacityAsInt, getCurrentCapacityAsLong, getFilledLevel, getNeededAsInt, getNeededAsLong, isEmpty -
Methods inherited from class net.neoforged.neoforge.common.util.ValueIOSerializable
deserialize, serialize -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
insert
abstract Integer insert(RESOURCE resource, Integer amount, TransactionContext transaction, HTHandlerAccess access)
-
extract
abstract Integer extract(RESOURCE resource, Integer amount, TransactionContext transaction, HTHandlerAccess access)
-
getResource
abstract RESOURCE getResource()
-
getAmountAsLong
abstract Long getAmountAsLong()
-
getAmountAsInt
Integer getAmountAsInt()
-
-
-
-