Package hiiragi283.core.util
Object HTStackSlotHelper
-
- All Implemented Interfaces:
public class HTStackSlotHelper
-
-
Field Summary
Fields Modifier and Type Field Description public final static HTStackSlotHelperINSTANCE
-
Method Summary
Modifier and Type Method Description final static <RESOURCE extends HTResourceType> HTResourceMoveResult<RESOURCE>moveResource(HTResourceSlot<RESOURCE> from, HTResourceSlot<RESOURCE> to, Integer amount, HTStorageAccess access)final static <RESOURCE extends HTResourceType> Integerinsert(Sequence<HTResourceSlot<RESOURCE>> slots, RESOURCE resource, Integer amount, HTStorageAction action, HTStorageAccess access)指定したresourceをすべてのスロットへ搬入します。 final static <RESOURCE extends HTResourceType> Integerextract(List<HTResourceSlot<RESOURCE>> slots, RESOURCE resource, Integer amount, HTStorageAction action, HTStorageAccess access)指定したresourceをすべてのスロットから搬出します。 final static IntegerinsertStacks(Sequence<HTResourceSlot<HTItemResourceType>> slots, ItemStack stack, HTStorageAction action, HTStorageAccess access)final static IntegerinsertStacks(Sequence<HTResourceSlot<HTFluidResourceType>> tanks, FluidStack stack, HTStorageAction action, HTStorageAccess access)-
-
Method Detail
-
moveResource
final static <RESOURCE extends HTResourceType> HTResourceMoveResult<RESOURCE> moveResource(HTResourceSlot<RESOURCE> from, HTResourceSlot<RESOURCE> to, Integer amount, HTStorageAccess access)
-
insert
final static <RESOURCE extends HTResourceType> Integer insert(Sequence<HTResourceSlot<RESOURCE>> slots, RESOURCE resource, Integer amount, HTStorageAction action, HTStorageAccess access)
指定したresourceをすべてのスロットへ搬入します。
- Returns:
搬入されない量
-
extract
final static <RESOURCE extends HTResourceType> Integer extract(List<HTResourceSlot<RESOURCE>> slots, RESOURCE resource, Integer amount, HTStorageAction action, HTStorageAccess access)
指定したresourceをすべてのスロットから搬出します。
- Returns:
搬出される量
-
insertStacks
final static Integer insertStacks(Sequence<HTResourceSlot<HTItemResourceType>> slots, ItemStack stack, HTStorageAction action, HTStorageAccess access)
-
insertStacks
final static Integer insertStacks(Sequence<HTResourceSlot<HTFluidResourceType>> tanks, FluidStack stack, HTStorageAction action, HTStorageAccess access)
-
-
-
-