davenonymous / OCXNetDriver

OpenComputers + XNet = ❤️
https://minecraft.curseforge.com/projects/oc-xnet-driver
4 stars 5 forks source link

Cast and Method versus Reflection #10

Closed Nerdpie closed 5 years ago

Nerdpie commented 5 years ago

https://github.com/thraaawn/OCXNetDriver/blob/179b1a3590d0a8f58ff524c0a972d6d7a35b7dce/src/main/java/org/dave/ocxnetdriver/driver/controller/EnvironmentXnetController.java#L483-L486

I don't know what the trade-off would be, but I saw this and wondered how it compares to casting the TE and calling the public getter, a la this. I'm genuinely curious; I haven't tested the performance of either.

davenonymous commented 5 years ago

I didn't use the methods because they are not part of the xnet api.