Plugins/Fluid Control/Get Fluid From Tank

Get Fluid From Tank
Gets the Fluid inside the tank of a block at a position at X Y Z.
new Object() {
    public FluidStack getFluidInTank(LevelAccessor level, BlocksPos pos) {
        if (level instanceof ILevelExtension _ext) {
            IFluidHandler _fluidhandler = _ext.getCapability(Capabilities.FluidHandler.BLOCK, pos, null);
            if (_fluidhandler != null) {
                return _fluidhandler.getFluidInTank(0);
            }
        }
        return FluidStack.EMPTY;
    }
}.getFluidInTank(world, BlockPos.containing(${input$x},${input$y},${input$z}))
${input$x} = X-Position of the Block
${input$y} = Y-Position of the Block
${input$z} = Z-Position of the Block
Return FluidStack