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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionIngredientComponentStorageWrapperHandlerFluidStack(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 booleanfluidActionToSimulate(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.FluidActionsimulateToFluidAction(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.IFluidHandlerwrapStorage(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, waitMethods 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:IIngredientComponentStorageWrapperHandlerWrap the given storage.- Specified by:
wrapComponentStoragein 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:IIngredientComponentStorageWrapperHandlerWrap the given storage.- Specified by:
wrapStoragein 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:IIngredientComponentStorageWrapperHandlerGet the storage within the given capability provider.- Specified by:
getStoragein 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:
getComponentin interfaceIIngredientComponentStorageWrapperHandler<net.neoforged.neoforge.fluids.FluidStack,Integer, net.neoforged.neoforge.fluids.capability.IFluidHandler, C> - Returns:
- The ingredient component.
-