Class IngredientComponentStorageWrapperHandlerEnergyStorage<C>
java.lang.Object
org.cyclops.commoncapabilities.ingredient.storage.IngredientComponentStorageWrapperHandlerEnergyStorage<C>
- All Implemented Interfaces:
IIngredientComponentStorageWrapperHandler<Long,Boolean, net.neoforged.neoforge.energy.IEnergyStorage, C>
public class IngredientComponentStorageWrapperHandlerEnergyStorage<C>
extends Object
implements IIngredientComponentStorageWrapperHandler<Long,Boolean,net.neoforged.neoforge.energy.IEnergyStorage,C>
Energy storage wrapper handler for
IEnergyStorage.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionIngredientComponentStorageWrapperHandlerEnergyStorage(IngredientComponent<Long, Boolean> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<net.neoforged.neoforge.energy.IEnergyStorage, C> capability) -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.neoforged.neoforge.energy.IEnergyStorage> getStorage(ICapabilityGetter<C> capabilityProvider, C context) Get the storage within the given capability provider.wrapComponentStorage(net.neoforged.neoforge.energy.IEnergyStorage storage) Wrap the given storage.net.neoforged.neoforge.energy.IEnergyStoragewrapStorage(IIngredientComponentStorage<Long, Boolean> componentStorage) Wrap the given storage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageWrapperHandler
getComponentStorage
-
Constructor Details
-
IngredientComponentStorageWrapperHandlerEnergyStorage
public IngredientComponentStorageWrapperHandlerEnergyStorage(IngredientComponent<Long, Boolean> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<net.neoforged.neoforge.energy.IEnergyStorage, C> capability)
-
-
Method Details
-
wrapComponentStorage
public IIngredientComponentStorage<Long,Boolean> wrapComponentStorage(net.neoforged.neoforge.energy.IEnergyStorage storage) Description copied from interface:IIngredientComponentStorageWrapperHandlerWrap the given storage.- Specified by:
wrapComponentStoragein interfaceIIngredientComponentStorageWrapperHandler<Long,Boolean, net.neoforged.neoforge.energy.IEnergyStorage, C> - Parameters:
storage- The external storage to wrap.- Returns:
- A component storage.
-
wrapStorage
public net.neoforged.neoforge.energy.IEnergyStorage wrapStorage(IIngredientComponentStorage<Long, Boolean> componentStorage) Description copied from interface:IIngredientComponentStorageWrapperHandlerWrap the given storage.- Specified by:
wrapStoragein interfaceIIngredientComponentStorageWrapperHandler<Long,Boolean, net.neoforged.neoforge.energy.IEnergyStorage, C> - Parameters:
componentStorage- The component storage to wrap.- Returns:
- A component storage.
-
getStorage
public Optional<net.neoforged.neoforge.energy.IEnergyStorage> getStorage(ICapabilityGetter<C> capabilityProvider, @Nullable C context) Description copied from interface:IIngredientComponentStorageWrapperHandlerGet the storage within the given capability provider.- Specified by:
getStoragein interfaceIIngredientComponentStorageWrapperHandler<Long,Boolean, net.neoforged.neoforge.energy.IEnergyStorage, 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:
getComponentin interfaceIIngredientComponentStorageWrapperHandler<Long,Boolean, net.neoforged.neoforge.energy.IEnergyStorage, C> - Returns:
- The ingredient component.
-