Class IngredientComponentStorageWrapperHandlerFluidStack<C>
java.lang.Object
org.cyclops.commoncapabilities.ingredient.storage.IngredientComponentStorageWrapperHandlerFluidStack<C>
- All Implemented Interfaces:
IIngredientComponentStorageWrapperHandler<net.neoforged.neoforge.fluids.FluidStack,
Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, C>
public class IngredientComponentStorageWrapperHandlerFluidStack<C>
extends Object
implements IIngredientComponentStorageWrapperHandler<net.neoforged.neoforge.fluids.FluidStack,Integer,net.neoforged.neoforge.fluids.capability.IFluidHandler,C>
Fluid storage wrapper handler for
IFluidHandler
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Constructor Summary
ConstructorDescriptionIngredientComponentStorageWrapperHandlerFluidStack
(IngredientComponent<net.neoforged.neoforge.fluids.FluidStack, Integer> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<? extends net.neoforged.neoforge.fluids.capability.IFluidHandler, C> capability) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
fluidActionToSimulate
(net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction fluidAction) IngredientComponent
<net.neoforged.neoforge.fluids.FluidStack, Integer> Optional
<net.neoforged.neoforge.fluids.capability.IFluidHandler> getStorage
(ICapabilityGetter<C> capabilityProvider, C context) Get the storage within the given capability provider.static net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction
simulateToFluidAction
(boolean simulate) IIngredientComponentStorage
<net.neoforged.neoforge.fluids.FluidStack, Integer> wrapComponentStorage
(net.neoforged.neoforge.fluids.capability.IFluidHandler storage) Wrap the given storage.net.neoforged.neoforge.fluids.capability.IFluidHandler
wrapStorage
(IIngredientComponentStorage<net.neoforged.neoforge.fluids.FluidStack, 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
-
IngredientComponentStorageWrapperHandlerFluidStack
public IngredientComponentStorageWrapperHandlerFluidStack(IngredientComponent<net.neoforged.neoforge.fluids.FluidStack, Integer> ingredientComponent, net.neoforged.neoforge.capabilities.BaseCapability<? extends net.neoforged.neoforge.fluids.capability.IFluidHandler, C> capability)
-
-
Method Details
-
simulateToFluidAction
public static net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction simulateToFluidAction(boolean simulate) -
fluidActionToSimulate
public static boolean fluidActionToSimulate(net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction fluidAction) -
wrapComponentStorage
public IIngredientComponentStorage<net.neoforged.neoforge.fluids.FluidStack,Integer> wrapComponentStorage(net.neoforged.neoforge.fluids.capability.IFluidHandler storage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapComponentStorage
in interfaceIIngredientComponentStorageWrapperHandler<net.neoforged.neoforge.fluids.FluidStack,
Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, C> - Parameters:
storage
- The external storage to wrap.- Returns:
- A component storage.
-
wrapStorage
public net.neoforged.neoforge.fluids.capability.IFluidHandler wrapStorage(IIngredientComponentStorage<net.neoforged.neoforge.fluids.FluidStack, Integer> componentStorage) Description copied from interface:IIngredientComponentStorageWrapperHandler
Wrap the given storage.- Specified by:
wrapStorage
in interfaceIIngredientComponentStorageWrapperHandler<net.neoforged.neoforge.fluids.FluidStack,
Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, C> - Parameters:
componentStorage
- The component storage to wrap.- Returns:
- A component storage.
-
getStorage
public Optional<net.neoforged.neoforge.fluids.capability.IFluidHandler> 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.neoforged.neoforge.fluids.FluidStack,
Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, 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.neoforged.neoforge.fluids.FluidStack,
Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, C> - Returns:
- The ingredient component.
-