Rebar Fluid Block
A block that interacts with fluids in some way.
This is a very flexible class which requires you to define exactly how fluid should be input and output. You are responsible for keeping track of any state, like how much fluid is stored.
Most fluid blocks can use RebarFluidBufferBlock or RebarFluidTank instead.
This interface allowed you to request fluids from input points, supply fluids to output points, and specify how to add/remove fluids from your block.
Multiple inputs/outputs are not supported. You can have at most 1 input and 1 output.
See also
Inheritors
Functions
Returns false if any entity is unloaded or does not exist.
Creates a fluid input point. Call in your place constructor. Should be called at most once per block.
Returns the amount of the given fluid that the machine wants to receive next tick.
Returns a list of fluid types - and their corresponding amounts - that can be supplied by the block for this fluid tick.
Returns false if the block holds no entity with the provided name, the entity is unloaded or does not physically exist.
Called as the block is being broken. At this point, the block break cannot be cancelled, but the physical block has not yet been broken or removed from io.github.pylonmc.rebar.block.BlockStorage.
amount is always at most getRequestedFluids().get(fluid) and will never be zero or less.
amount is always at least getSuppliedFluids().get(fluid) and will never be zero or less.
Called after the block has been broken. At this point, the block has been physically removed, block drops have been dropped, and the block has been removed from io.github.pylonmc.rebar.block.BlockStorage.
Called before the block is broken. Note this is not called for Deletions as those are not cancellable.