Hello! I'm a creator of open-source Terraria rewrite in Java. Our project grows and already supports modding. Here is a simple example,
that allows player switch to Ghost mode using 'g' key:
public void onLoad() {
ModAPI.addKeyBinding(Input.KEY_G, new Callable() {
public void call() {
enabled = !enabled;
ModAPI.getPlayer().setGhostMode(enabled);
}
});
}
Full code: https://github.com/egordorichev/LastTryMods/blob/master/GhostMod/src/org/egordorichev/ghostmod/GhostMod.java Here is the repository: https://github.com/egordorichev/LastTry
If any one is interested, please, join me! Thanks, George.
im not sure if java is any better than c# (what the real thing is written in) for performance
don't you also need permission to use the game assets like that