Posted 05 November 2016 - 07:18 PM
Hello everyone!
I've been wanting to create a new default API for computers, and I noticed that there wasn't any form of registry for ILuaAPI classes, and that they were added in an hard-coded fashion.
Do you think it could be possible to add such a thing? It would be great to add custom default Java API, without requiring dirty code injection tricks.
Currently I'm patching dan200.computercraft.core.computer.Computer.createAPIs() as a coremod, but it really isn't ideal.
Thanks for reading.
EDIT: Ok after checking you can also just patch the class in the preInit using traditional runtime classpath bytecode editors, so no need for a coremod, but it still is not pretty.
I've been wanting to create a new default API for computers, and I noticed that there wasn't any form of registry for ILuaAPI classes, and that they were added in an hard-coded fashion.
Do you think it could be possible to add such a thing? It would be great to add custom default Java API, without requiring dirty code injection tricks.
Currently I'm patching dan200.computercraft.core.computer.Computer.createAPIs() as a coremod, but it really isn't ideal.
Thanks for reading.
EDIT: Ok after checking you can also just patch the class in the preInit using traditional runtime classpath bytecode editors, so no need for a coremod, but it still is not pretty.
Edited on 06 November 2016 - 06:44 AM