Consider using a [Converter](https://github.com/MightyPirates/OpenComputers/blob/master/src/main/java/li/cil/oc/api/driver/Converter.java) instead?