I'm curious how you developed the "very cute headless" Minecraft client. Did you use the Forge build tools? How did you go about ripping out the rendering/keyboard stuff?
Yes, Forgegradle was used. Frankly, not much interesting here, just a whole lot of work going through all the Minecraft code, and using Java reflection where possible and JVM bytecode injection otherwise. There's a lot of access transforming, using theUnsafe to allocate classes without calling their constructors, etc. As a random example that I remember, one of the last things to patch was that we had it working, but when you got kicked from the server, it would crash. This is because it would try to create a currentScreen GUI for the "disconnected from server" message, which for some reason was long enough that it was considering whether to wrap the text to the next line, which needed something like a font size, or maybe the window width, which crashed since there is no window or font.
leijurv|4 years ago