Class IngredientComponentStorageWrapperHandlerItemStackSlotless<C>
java.lang.Object
org.cyclops.commoncapabilities.ingredient.storage.IngredientComponentStorageWrapperHandlerItemStackSlotless<C>
- All Implemented Interfaces:
IIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,
Integer, ISlotlessItemHandler, C>
public class IngredientComponentStorageWrapperHandlerItemStackSlotless<C>
extends Object
implements IIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,Integer,ISlotlessItemHandler,C>
Item storage wrapper handler for
ISlotlessItemHandler
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorDescriptionIngredientComponentStorageWrapperHandlerItemStackSlotless
(IngredientComponent<net.minecraft.world.item.ItemStack, Integer> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<ISlotlessItemHandler, C> capability) -
Method Summary
Modifier and TypeMethodDescriptionIngredientComponent
<net.minecraft.world.item.ItemStack, Integer> getStorage
(ICapabilityGetter<C> capabilityProvider, C context) Get the storage within the given capability provider.IIngredientComponentStorage
<net.minecraft.world.item.ItemStack, Integer> wrapComponentStorage
(ISlotlessItemHandler storage) Wrap the given storage.wrapStorage
(IIngredientComponentStorage<net.minecraft.world.item.ItemStack, Integer> componentStorage) Wrap the given storage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageWrapperHandler
getComponentStorage
-
Constructor Details
-
IngredientComponentStorageWrapperHandlerItemStackSlotless
public IngredientComponentStorageWrapperHandlerItemStackSlotless(IngredientComponent<net.minecraft.world.item.ItemStack, Integer> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<ISlotlessItemHandler, C> capability)
-
-
Method Details
-
wrapComponentStorage
public IIngredientComponentStorage<net.minecraft.world.item.ItemStack,Integer> wrapComponentStorage(ISlotlessItemHandler storage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapComponentStorage
in interfaceIIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,
Integer, ISlotlessItemHandler, C> - Parameters:
storage
- The external storage to wrap.- Returns:
- A component storage.
-
wrapStorage
public ISlotlessItemHandler wrapStorage(IIngredientComponentStorage<net.minecraft.world.item.ItemStack, Integer> componentStorage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapStorage
in interfaceIIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,
Integer, ISlotlessItemHandler, C> - Parameters:
componentStorage
- The component storage to wrap.- Returns:
- A component storage.
-
getStorage
public Optional<ISlotlessItemHandler> getStorage(ICapabilityGetter<C> capabilityProvider, @Nullable C context) Description copied from interface:IIngredientComponentStorageWrapperHandler
Get the storage within the given capability provider.- Specified by:
getStorage
in interfaceIIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,
Integer, ISlotlessItemHandler, C> - Parameters:
capabilityProvider
- A capability provider.context
- The context to get the storage with.- Returns:
- A storage, or null if it does not exist.
-
getComponent
- Specified by:
getComponent
in interfaceIIngredientComponentStorageWrapperHandler<net.minecraft.world.item.ItemStack,
Integer, ISlotlessItemHandler, C> - Returns:
- The ingredient component.
-