public interface IFluidBlock
BlockFluidBase
is encouraged.Modifier and Type | Method and Description |
---|---|
boolean |
canDrain(World world,
BlockPos pos)
Check to see if a block can be drained.
|
FluidStack |
drain(World world,
BlockPos pos,
IFluidHandler.FluidAction action)
Attempt to drain the block.
|
float |
getFilledPercentage(World world,
BlockPos pos)
Returns the amount of a single block is filled.
|
Fluid |
getFluid()
Returns the Fluid associated with this Block.
|
int |
place(World world,
BlockPos pos,
FluidStack fluidStack,
IFluidHandler.FluidAction action)
Attempts to place the block at a given position.
|
Fluid getFluid()
int place(World world, BlockPos pos, @Nonnull FluidStack fluidStack, IFluidHandler.FluidAction action)
FluidUtil
.world
- the world to place the block inpos
- the position to place the block atfluidStack
- the fluid stack to get the required data fromaction
- If SIMULATE, the placement will only be simulated@Nonnull FluidStack drain(World world, BlockPos pos, IFluidHandler.FluidAction action)
action
- If SIMULATE, the drain will only be simulated.boolean canDrain(World world, BlockPos pos)
float getFilledPercentage(World world, BlockPos pos)