question: public static long translateMaterialToAmount ( long aMaterialAmount , long aAmountPerUnit , boolean aRoundUp ) { return Math . max ( 0 , ( ( aMaterialAmount * aAmountPerUnit ) / M ) + ( aRoundUp && ( aMaterialAmount * aAmountPerUnit ) % M > 0 ? 1 : 0 ) ) ; }
target:  Translates a Material Amount into an Amount of Fluid. Second Parameter for things like Bucket Amounts (1000) and similar