Package alexiil.mc.lib.attributes.fluid
Class FluidContainerRegistry.FluidFillHandler
java.lang.Object
alexiil.mc.lib.attributes.fluid.FluidContainerRegistry.FluidFillHandler
- Enclosing class:
- FluidContainerRegistry
Fill handler for an empty
ItemStack
. This is registered with. Alternatively you can implement the
functional interface variant FluidContainerRegistry.FluidFillFunction
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Stack return function forinsert(ItemStack, FluidVolume, Simulation, StackReturnFunc)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract FluidAmount
getCapacity
(FluidFilter filter) protected abstract FluidVolume
insert
(net.minecraft.item.ItemStack stack, FluidVolume fluid, Simulation simulation, FluidContainerRegistry.FluidFillHandler.StackReturnFunc stackReturn)
-
Field Details
-
minimum
-
-
Constructor Details
-
FluidFillHandler
-
-
Method Details
-
insert
protected abstract FluidVolume insert(net.minecraft.item.ItemStack stack, FluidVolume fluid, Simulation simulation, FluidContainerRegistry.FluidFillHandler.StackReturnFunc stackReturn) - Parameters:
stack
- A copy of theItemStack
that was stored in theStackReference
.fluid
- The fluid to insert. (So you should always copy this rather than modify it). Note that this will never be empty, or have an amount less thanminimum
.simulation
-stackReturn
- A function to set the new stacks to.- Returns:
- The excess
FluidVolume
that couldn't be inserted.
-
getCapacity
- Parameters:
filter
- the fluids to test.- Returns:
-