public static long translateMaterialToAmount(long aMaterialAmount,long aAmountPerUnit,boolean aRoundUp){
  return Math.max(0,((aMaterialAmount * aAmountPerUnit) / M) + (aRoundUp && (aMaterialAmount * aAmountPerUnit) % M > 0 ? 1 : 0));
}

public static long translateMaterialToAmount ( long aMaterialAmount , long aAmountPerUnit , boolean aRoundUp ) { return Math . max ( 0 , ( ( aMaterialAmount * aAmountPerUnit ) / M ) + ( aRoundUp && ( aMaterialAmount * aAmountPerUnit ) % M > 0 ? 1 : 0 ) ) ; }
translates a material amount into an amount of fluid . second parameter for things like bucket amounts ( 1000 ) and similar
