Plugins/Fluid Control/Get Amount of Fluid in Tank

Get Amount of Fluid in Tank
Gets the Amount of the Fluid in Millibucket(mB) stored in the Tank a Block at a position at X Y Z.
new Object() {
    public int getAmountInTank(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).getAmount();
            }
        }
        return 0;
    }
}.getAmountInTank(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 Number