Plugins/Fluid Control/Can Fluid be inserted into Tank

Can Fluid can be inserted into Tank
Checks if the fluid can be inserted into the tank of a block at a position at X Y Z.
Note: The Code only checks if the specified fluid is a whitelisted fluid, which is true for almost all fluid tanks. The code does not check for the Amount of Fluid in the tank or if the tank even has a fluid.
new Object() {
    public boolean isFluidValid(LevelAccessor level, BlocksPos pos, FluidStack stack) {
        if (level instanceof ILevelExtension _ext) {
            IFluidHandler _fluidhandler = _ext.getCapability(Capabilities.FluidHandler.BLOCK, pos, null);
            if (_fluidhandler != null) {
                return _fluidhandler.isFluidValid(0, stack);
            }
        }
        return false;
    }
}.isFluidValid(world, BlockPos.containing(${input$x},${input$y},${input$z}), ${input$FluidStack})
${input$x} = X-Position of the Block
${input$y} = Y-Position of the Block
${input$z} = Z-Position of the Block
${input$FluidStack} = Fluid to check if insertion is valid
Return Boolean