Class IngredientComponentStorageWrapperHandlerEnergyStorage
java.lang.Object
org.cyclops.commoncapabilities.ingredient.storage.IngredientComponentStorageWrapperHandlerEnergyStorage
- All Implemented Interfaces:
IIngredientComponentStorageWrapperHandler<Long,
Boolean, net.minecraftforge.energy.IEnergyStorage>
public class IngredientComponentStorageWrapperHandlerEnergyStorage
extends Object
implements IIngredientComponentStorageWrapperHandler<Long,Boolean,net.minecraftforge.energy.IEnergyStorage>
Energy storage wrapper handler for
IEnergyStorage
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorsConstructorDescriptionIngredientComponentStorageWrapperHandlerEnergyStorage
(IngredientComponent<Long, Boolean> ingredientComponent) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraftforge.common.util.LazyOptional<net.minecraftforge.energy.IEnergyStorage>
getStorage
(net.minecraftforge.common.capabilities.ICapabilityProvider capabilityProvider, net.minecraft.core.Direction facing) Get the storage within the given capability provider.wrapComponentStorage
(net.minecraftforge.energy.IEnergyStorage storage) Wrap the given storage.net.minecraftforge.energy.IEnergyStorage
wrapStorage
(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, wait
Methods inherited from interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageWrapperHandler
getComponentStorage
-
Constructor Details
-
IngredientComponentStorageWrapperHandlerEnergyStorage
public IngredientComponentStorageWrapperHandlerEnergyStorage(IngredientComponent<Long, Boolean> ingredientComponent)
-
-
Method Details
-
wrapComponentStorage
public IIngredientComponentStorage<Long,Boolean> wrapComponentStorage(net.minecraftforge.energy.IEnergyStorage storage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapComponentStorage
in interfaceIIngredientComponentStorageWrapperHandler<Long,
Boolean, net.minecraftforge.energy.IEnergyStorage> - Parameters:
storage
- The external storage to wrap.- Returns:
- A component storage.
-
wrapStorage
public net.minecraftforge.energy.IEnergyStorage wrapStorage(IIngredientComponentStorage<Long, Boolean> componentStorage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapStorage
in interfaceIIngredientComponentStorageWrapperHandler<Long,
Boolean, net.minecraftforge.energy.IEnergyStorage> - Parameters:
componentStorage
- The component storage to wrap.- Returns:
- A component storage.
-
getStorage
@Nullable public net.minecraftforge.common.util.LazyOptional<net.minecraftforge.energy.IEnergyStorage> getStorage(net.minecraftforge.common.capabilities.ICapabilityProvider capabilityProvider, @Nullable net.minecraft.core.Direction facing) Description copied from interface:IIngredientComponentStorageWrapperHandler
Get the storage within the given capability provider.- Specified by:
getStorage
in interfaceIIngredientComponentStorageWrapperHandler<Long,
Boolean, net.minecraftforge.energy.IEnergyStorage> - Parameters:
capabilityProvider
- A capability provider.facing
- The side to get the storage from.- Returns:
- A storage, or null if it does not exist.
-
getComponent
- Specified by:
getComponent
in interfaceIIngredientComponentStorageWrapperHandler<Long,
Boolean, net.minecraftforge.energy.IEnergyStorage> - Returns:
- The ingredient component.
-