Class BlockWrapper
java.lang.Object
net.neoforged.neoforge.fluids.capability.templates.VoidFluidHandler
net.neoforged.neoforge.fluids.capability.wrappers.BlockWrapper
- All Implemented Interfaces:
IFluidHandler
Wrapper around any block, only accounts for fluid placement, otherwise the block acts a void.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.neoforged.neoforge.fluids.capability.IFluidHandler
IFluidHandler.FluidAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.core.BlockPos
protected final net.minecraft.world.level.block.state.BlockState
protected final net.minecraft.world.level.Level
Fields inherited from class net.neoforged.neoforge.fluids.capability.templates.VoidFluidHandler
INSTANCE
-
Constructor Summary
ConstructorsConstructorDescriptionBlockWrapper
(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos) -
Method Summary
Modifier and TypeMethodDescriptionint
fill
(FluidStack resource, IFluidHandler.FluidAction action) Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.Methods inherited from class net.neoforged.neoforge.fluids.capability.templates.VoidFluidHandler
drain, drain, getFluidInTank, getTankCapacity, getTanks, isFluidValid
-
Field Details
-
state
protected final net.minecraft.world.level.block.state.BlockState state -
world
protected final net.minecraft.world.level.Level world -
blockPos
protected final net.minecraft.core.BlockPos blockPos
-
-
Constructor Details
-
BlockWrapper
public BlockWrapper(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos)
-
-
Method Details
-
fill
Description copied from interface:IFluidHandler
Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.- Specified by:
fill
in interfaceIFluidHandler
- Overrides:
fill
in classVoidFluidHandler
- Parameters:
resource
- FluidStack representing the Fluid and maximum amount of fluid to be filled.action
- If SIMULATE, fill will only be simulated.- Returns:
- Amount of resource that was (or would have been, if simulated) filled.
-