Jump to content

[Java API] ILuaAPI registry

  • You cannot reply to this topic
No replies to this topic

#1 JustPingo

  • Members
  • 108 posts
  • LocationFrance

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.

Edited by JustPingo, 06 November 2016 - 07:44 AM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users