Package hiiragi283.lib.recipe.handler
Class HTItemInputHandler
-
- All Implemented Interfaces:
-
hiiragi283.lib.recipe.handler.HTInputHandler,hiiragi283.lib.transfer.HTResourceSlot,hiiragi283.lib.transfer.HTResourceView,net.neoforged.neoforge.common.util.ValueIOSerializable
public final class HTItemInputHandler implements HTInputHandler<ItemStack>, HTResourceSlot<ItemResource>
-
-
Field Summary
Fields Modifier and Type Field Description private final ItemResourceresourceprivate final LongamountAsLongprivate final IntegeramountAsInt
-
Constructor Summary
Constructors Constructor Description HTItemInputHandler(HTResourceSlot<ItemResource> slot, Function2<ItemResource, Integer, Unit> remainderConsumer)
-
Method Summary
Modifier and Type Method Description abstract ItemResourcegetResource()abstract LonggetAmountAsLong()IntegergetAmountAsInt()Result<Integer>extract(Integer amount, TransactionContext transaction)指定した数量だけ中身を消費します。 -
Methods inherited from class hiiragi283.lib.transfer.HTResourceSlot
extract, insert, isValid -
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
-
-
Constructor Detail
-
HTItemInputHandler
HTItemInputHandler(HTResourceSlot<ItemResource> slot, Function2<ItemResource, Integer, Unit> remainderConsumer)
-
-
Method Detail
-
getResource
abstract ItemResource getResource()
-
getAmountAsLong
abstract Long getAmountAsLong()
-
getAmountAsInt
Integer getAmountAsInt()
-
-
-
-