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,
boolean doDrain)
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,
boolean doPlace)
Attempts to place the block at a given position.
|
Fluid getFluid()
int place(World world, BlockPos pos, @Nonnull FluidStack fluidStack, boolean doPlace)
FluidUtil
.world
- the world to place the block inpos
- the position to place the block atfluidStack
- the fluid stack to get the required data fromdoPlace
- if false, the placement will only be simulated@Nullable FluidStack drain(World world, BlockPos pos, boolean doDrain)
doDrain
- If false, the drain will only be simulated.boolean canDrain(World world, BlockPos pos)
float getFilledPercentage(World world, BlockPos pos)