Package org.moddingx.libx.capability
Class ItemCapabilities
java.lang.Object
org.moddingx.libx.capability.ItemCapabilities
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable>
Creates a newLazyOptional
for anIItemHandlerModifiable
.static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable>
create
(Supplier<net.minecraftforge.items.IItemHandlerModifiable> handler, Predicate<Integer> extract, BiPredicate<Integer, net.minecraft.world.item.ItemStack> insert) Creates a newLazyOptional
for anIItemHandlerModifiable
.static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable>
create
(net.minecraftforge.items.IItemHandlerModifiable handler) Creates a newLazyOptional
for anIItemHandlerModifiable
.static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable>
create
(net.minecraftforge.items.IItemHandlerModifiable handler, Predicate<Integer> extract, BiPredicate<Integer, net.minecraft.world.item.ItemStack> insert) Creates a newLazyOptional
for anIItemHandlerModifiable
.
-
Constructor Details
-
ItemCapabilities
public ItemCapabilities()
-
-
Method Details
-
create
public static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable> create(net.minecraftforge.items.IItemHandlerModifiable handler) Creates a newLazyOptional
for anIItemHandlerModifiable
. -
create
public static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable> create(net.minecraftforge.items.IItemHandlerModifiable handler, @Nullable Predicate<Integer> extract, @Nullable BiPredicate<Integer, net.minecraft.world.item.ItemStack> insert) Creates a newLazyOptional
for anIItemHandlerModifiable
.- Parameters:
extract
- A predicate on whether an item can be extracted through thisLazyOptional
. This gets passed the slot to extract from.insert
- A predicate on whether an item can be inserted through thisLazyOptional
. This gets passed the slot to insert to and the stack that should be inserted..
-
create
public static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable> create(Supplier<net.minecraftforge.items.IItemHandlerModifiable> handler) Creates a newLazyOptional
for anIItemHandlerModifiable
. -
create
public static net.minecraftforge.common.util.LazyOptional<IAdvancedItemHandlerModifiable> create(Supplier<net.minecraftforge.items.IItemHandlerModifiable> handler, @Nullable Predicate<Integer> extract, @Nullable BiPredicate<Integer, net.minecraft.world.item.ItemStack> insert) Creates a newLazyOptional
for anIItemHandlerModifiable
.- Parameters:
extract
- A predicate on whether an item can be extracted through thisLazyOptional
. This gets passed the slot to extract from.insert
- A predicate on whether an item can be inserted through thisLazyOptional
. This gets passed the slot to insert to and the stack that should be inserted..
-