We'd need to see the whole class, because without even looking at the render code, I can't tell if it's a problem where "ingame" is never set to true when that's running or if it's something else entirely. You're also putting your render code straight in your LiteModBase class, and while I'm not 100% certain on this, I feel it's better practice to put all of your render code in its own class and call it from there. In my mods, I generally have the Renderer class instantiated, and call renderer.render() in onTick() which you'd have to implement Tickable to use.
Again, I'm not necessarily the expert on this, but the renderers in my mods work well enough, and you can use the code for those on github as further examples.
Rollback Post to RevisionRollBack
Have an idea for a mod? Join me on Discord or let me know here! (I prefer Discord though)
Keep track of the latest news and updates by following my twitter!
Feel like playing MC with me? Join me on the official PC Gamer US server here!
I drawed something like Worldedit Cui with my mod, and i can tell u that u have to call it at the right point. It wont work if u call it in the gameloop thing.
I basically ripped the core technology of liteloader out and turned it into a standalone project called Mixin which now powers Sponge as well as quite a few other mods which are adopting it since it's so powerful.
Let us apply an interface of our choosing to the target class at runtime
Let us insert a method implementation for any methods which are declared in the interface but are not present in the target class
OMG, you actually implemented Objective-C style categories to extend a class in Java!
Does this work with forge mods, or only with lite loader mods?
Does it work back in 1.7.10, or if not, what's the earliest working version?
i.e. -- how much is "mixin" tied to minecraft, and how much is it "generic java"?
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
The LiteLoader page needs an update for http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1287646-uyjulians-x-ray-mod-1-12-1-no-patcher-required (1.12 and 1.12.1 are now available). There may be other updates needed, that just happened to be the one I noticed while checking for ones that have not updated yet. If anyone has a few more to add (or devs following this message thread that know they've updated) it would be useful for @Mumphrey to have a complete list. It is just unfortunate I'm short on time to double-check it right now.
OMG, you actually implemented Objective-C style categories to extend a class in Java!
Does this work with forge mods, or only with lite loader mods?
Does it work back in 1.7.10, or if not, what's the earliest working version?
i.e. -- how much is "mixin" tied to minecraft, and how much is it "generic java"?
The type of mixing that I'm doing actually covers various different concepts from different programming languages, allowing for equivalents of extension methods, similar transformations to some AOP frameworks like AspectJ, traits, and various others. The main thing about Mixin is that it's designed with mod development in mind so support for obfuscated targets is built into it, much of this is achieved because Mixin itself is in two parts: the core library which does all the runtime work, and an Annotation Processor which manages all of the compile-time processing which ties into ForgeGradle.
Essentially, mixin is about 70% general-purpose and 30% specialised to the task of working with Minecraft. The general-purpose parts can of course be used stand-alone, so you could use it with any project and not leverage the parts of the framework which deal with obfuscation. The earliest version it will work with is not limited at all, any version which can be wrapped in launchwrapper could use it, right back to classic. However the limiting factor for development is the toolchain. Whilst you could use the AP with (for example) very old versions of MCP, you'd need to generate all the input data by hand and create a complex build process to gather the outputs and bundle them with the compiled artefact.
The oldest version of liteloader which supports mixin is 1.8.9, though much of the functionality was available before that in liteloader under different names, and the foundation of mixin is actually liteloader's legacy core transformers ripped out and made stand-alone.
The LiteLoader page needs an update for http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1287646-uyjulians-x-ray-mod-1-12-1-no-patcher-required (1.12 and 1.12.1 are now available). There may be other updates needed, that just happened to be the one I noticed while checking for ones that have not updated yet. If anyone has a few more to add (or devs following this message thread that know they've updated) it would be useful for @Mumphrey to have a complete list. It is just unfortunate I'm short on time to double-check it right now.
Updated. I have had various pokes about other mods too so it should be mostly up to date.
Using the JNI defeats the entire purpose of Java. it's supposed to be compile once, run anywhere. You can't do that with c. Not to mention the security risks that brings.
You can use the JNI if you want, but you have to make a custom launcher profile and manually load the natives.
Well, using the example mod on the site as a template, I managed to get a mod setup and everything seems to be working fine. Here's some snippets from the output when running the generated "Minecraft Client" run configuration:
[07:43:37] [main/INFO]: Inspecting jar metadata in 'mod-liteloadertest-1.0-mc1.12.1.litemod'
[07:43:37] [main/INFO]: Considering valid mod file: C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod
[07:43:37] [main/INFO]: Adding newest valid mod file 'C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod' at revision 11.0000
[07:43:53] [main/INFO]: Successfully injected mod file 'C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod' into classpath
However, when it finishes opening, my mod does not show up in the mod list, and the onTick in the mod isn't being run.
What's even stranger is, if something is invalid like, say, I put the wrong mcversion, it DOES show in the menu and says the incorrect version that the mod supports. But as soon as I fix that, it no longer shows up.
Well, using the example mod on the site as a template, I managed to get a mod setup and everything seems to be working fine. Here's some snippets from the output when running the generated "Minecraft Client" run configuration:
[07:43:37] [main/INFO]: Inspecting jar metadata in 'mod-liteloadertest-1.0-mc1.12.1.litemod'
[07:43:37] [main/INFO]: Considering valid mod file: C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod
[07:43:37] [main/INFO]: Adding newest valid mod file 'C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod' at revision 11.0000
[07:43:53] [main/INFO]: Successfully injected mod file 'C:\Users\502ba\IdeaProjects\liteloadertest\run\mods\1.12.1\mod-liteloadertest-1.0-mc1.12.1.litemod' into classpath
However, when it finishes opening, my mod does not show up in the mod list, and the onTick in the mod isn't being run.
What's even stranger is, if something is invalid like, say, I put the wrong mcversion, it DOES show in the menu and says the incorrect version that the mod supports. But as soon as I fix that, it no longer shows up.
The logs indicate that the container is valid, so if you make the container invalid then it will show that up as an error. However if the container is valid but doesn't contain any valid mod classes, then it's not going to show up in the list. The relevant part of the log is where it says "Discovering mods in valid mod files...", if it shows no results then it's because your jar doesn't actually contain any valid mods.
For a mod class to be valid it must:
Start with the prefix LiteMod
Implement one or more of the Liteloader listener interfaces
I suggest you start with the ExampleMod and check that you can get it building, and then move from there. If in doubt, please provide the whole startup log since it's difficult to tell exactly what's going on from looking at only snippets.
The logs indicate that the container is valid, so if you make the container invalid then it will show that up as an error. However if the container is valid but doesn't contain any valid mod classes, then it's not going to show up in the list. The relevant part of the log is where it says "Discovering mods in valid mod files...", if it shows no results then it's because your jar doesn't actually contain any valid mods.
For a mod class to be valid it must:
Start with the prefix LiteMod
Implement one or more of the Liteloader listener interfaces
I suggest you start with the ExampleMod and check that you can get it building, and then move from there. If in doubt, please provide the whole startup log since it's difficult to tell exactly what's going on from looking at only snippets.
Ohh I failed to realize the class had to start with "LiteMod". It's always something so simple haha. Thanks a lot!
Hello, I'm just having problems using the latest 1.10.2 liteloader snapshot along-side a sponge-forge server.
The server successfully loads any forge mods I want, I've definitely narrowed the problem down to the liteloader mod having issues with spongeforge.
I've tried using build #16 & #13 but neither seemed to fix the issue, the logs from the server are the same.
I install liteloader by selecting "extract liteloader.jar" and placing it in the spongeforge mods/1.10.2 folder (where I've put all the other working forge mods).
I'm using Liteloader mainly to run WorldDownloader to save my Multiplayerbuilding locally and it works like a charm (on the servers I'm currently working) but I read online that some servers dislike LiteLoader and WorldDownloader and have ways to detect it because LiteLoader is sending a modlist to the server on login.
So here my question for the devs: Is it true, that liteloader sends the modlist to the server? or the protocol is altered in a way so the server is able to detect it or are those detections based on heuristics?
There is obviously no need to hide anything from the server, because if you're abiding by the server rules then there's really no issue. Servers can identify LiteLoader and possibly WDL if they wish to, though there are much better ways to control this kind of thing for a server's point of view.
LiteLoader installed alone will change the client "brand" to "LiteLoader" which is sent to the server when you log in
LiteLoader does not send a mod list to the server (what would be the point?)
Any mods which support ClientPermissions such as VoxelMap or Macro/Keybind mod will send a permissions request packet to the server when you log in, this means these mods are easily detectable, but the whole point of permissions is that if (for example) the server wants to allow or disallow the entity radar in VoxelMap, they can simply do so using permissions
Mods are of course free to send their own custom packets to the server, for example WorldEdtCUI sends a handshake packet to the server if WorldEdit is installed
Whilst WorldDownloader doesn't use ClientPermissions, it does provide a server plugin which can be used to disable, control or enhance its functionality, so if a server is running this plugin then it can interact with WDL on your client. I'm not sure if WDL advertises itself in any other way. I would imagine it does not, other than maybe registering the custom payload channel, which would of course be visible from the server.
As for your original question. I don't know of any servers that would have a legitimate reason to dislike liteloader since, like forge, it's just a platform for mods to actually load, and any servers which disliked liteloader would have identical reasons to dislike forge. Also, liteloader does not send a modlist to the server because it would be pretty pointless, but certain other network traffic could be used to identify specific mods as described above. I'm not sure "heuristics" is the right word for this kind of detection, because straightforward examimation of the incoming payload would make it obvious exactly which mod is involved.
Honestly if you adhere to any guidelines made by the server as to whether certain things are allowed or not, then there likely won't be a problem.
I make a point of making sure all the players on my server know where the "goodies" are, and how to use them as diagnostic tools and aids rather than as "cheats". I then make the point to explain, "If you cheat and ruin the game for yourself, I'll be disappointed. If you cheat and ruin the game for someone ELSE, I will be annoyed. And I usually express my displeasure in perma-bans."
I simply don't have time to worry about someone ELSE using tools *I* make available for myself for legitimate reasons. A server that feels they have to worry about this is much better off running a "Bedrock" server of Minecraft where LiteLoader, Forge, and so on are not an issue. Or run a VERY small whitelist server for worthy, mature players, as I do.
Use a render hook and use the Tessellator to draw quads. There is an example in the worldedit cui source.
Mods I work on and maintain:
TabbyChat | Mine Little Pony
My Blog
This is test code. I am using some code from WECUI and this is what it looks like but nothing is drawing the code is getting called though
https://hastebin.com/fexomopitu.java
We'd need to see the whole class, because without even looking at the render code, I can't tell if it's a problem where "ingame" is never set to true when that's running or if it's something else entirely. You're also putting your render code straight in your LiteModBase class, and while I'm not 100% certain on this, I feel it's better practice to put all of your render code in its own class and call it from there. In my mods, I generally have the Renderer class instantiated, and call renderer.render() in onTick() which you'd have to implement Tickable to use.
Again, I'm not necessarily the expert on this, but the renderers in my mods work well enough, and you can use the code for those on github as further examples.
Have an idea for a mod? Join me on Discord or let me know here! (I prefer Discord though)
Keep track of the latest news and updates by following my twitter!
Feel like playing MC with me? Join me on the official PC Gamer US server here!
I drawed something like Worldedit Cui with my mod, and i can tell u that u have to call it at the right point. It wont work if u call it in the gameloop thing.
thats my mod https://github.com/1337Zero/Zombe/
i call the render code with the Postrenderlistener from the "onPostRenderEntities" function
hope it helps u
btw, is there a better way to get a callback from GlobalRenderlistener -> setupterrain than overriding that class on startup ?
maybe mixin but i never looked at that much
IGNORE THIS IGNORE THIS
OMG, you actually implemented Objective-C style categories to extend a class in Java!
Does this work with forge mods, or only with lite loader mods?
Does it work back in 1.7.10, or if not, what's the earliest working version?
i.e. -- how much is "mixin" tied to minecraft, and how much is it "generic java"?
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
The LiteLoader page needs an update for http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1287646-uyjulians-x-ray-mod-1-12-1-no-patcher-required (1.12 and 1.12.1 are now available). There may be other updates needed, that just happened to be the one I noticed while checking for ones that have not updated yet.
If anyone has a few more to add (or devs following this message thread that know they've updated) it would be useful for @Mumphrey to have a complete list. It is just unfortunate I'm short on time to double-check it right now. 
The type of mixing that I'm doing actually covers various different concepts from different programming languages, allowing for equivalents of extension methods, similar transformations to some AOP frameworks like AspectJ, traits, and various others. The main thing about Mixin is that it's designed with mod development in mind so support for obfuscated targets is built into it, much of this is achieved because Mixin itself is in two parts: the core library which does all the runtime work, and an Annotation Processor which manages all of the compile-time processing which ties into ForgeGradle.
Essentially, mixin is about 70% general-purpose and 30% specialised to the task of working with Minecraft. The general-purpose parts can of course be used stand-alone, so you could use it with any project and not leverage the parts of the framework which deal with obfuscation. The earliest version it will work with is not limited at all, any version which can be wrapped in launchwrapper could use it, right back to classic. However the limiting factor for development is the toolchain. Whilst you could use the AP with (for example) very old versions of MCP, you'd need to generate all the input data by hand and create a complex build process to gather the outputs and bundle them with the compiled artefact.
The oldest version of liteloader which supports mixin is 1.8.9, though much of the functionality was available before that in liteloader under different names, and the foundation of mixin is actually liteloader's legacy core transformers ripped out and made stand-alone.
Updated. I have had various pokes about other mods too so it should be mostly up to date.
Will a new tutorial be out soon? I would like to get started working with Liteloader, but I'm not sure exactly how I'm supposed to use it with MCP..
(I use IntelliJ)
U dont need MCP anymore for Liteloader
https://github.com/1337Zero/Zombe#i-dont-trust-you-and-want-to-build-my-own-version
not quite sure if u need liteloader, or not^^
basicly just do this
if not working look at mumfreys sponge tutorial which is nearly the same for liteloader
Using the JNI defeats the entire purpose of Java. it's supposed to be compile once, run anywhere. You can't do that with c. Not to mention the security risks that brings.
You can use the JNI if you want, but you have to make a custom launcher profile and manually load the natives.
Mods I work on and maintain:
TabbyChat | Mine Little Pony
My Blog
Well, using the example mod on the site as a template, I managed to get a mod setup and everything seems to be working fine. Here's some snippets from the output when running the generated "Minecraft Client" run configuration:
However, when it finishes opening, my mod does not show up in the mod list, and the onTick in the mod isn't being run.
What's even stranger is, if something is invalid like, say, I put the wrong mcversion, it DOES show in the menu and says the incorrect version that the mod supports. But as soon as I fix that, it no longer shows up.
The logs indicate that the container is valid, so if you make the container invalid then it will show that up as an error. However if the container is valid but doesn't contain any valid mod classes, then it's not going to show up in the list. The relevant part of the log is where it says "Discovering mods in valid mod files...", if it shows no results then it's because your jar doesn't actually contain any valid mods.
For a mod class to be valid it must:
I suggest you start with the ExampleMod and check that you can get it building, and then move from there. If in doubt, please provide the whole startup log since it's difficult to tell exactly what's going on from looking at only snippets.
Ohh I failed to realize the class had to start with "LiteMod". It's always something so simple haha. Thanks a lot!
Hello, I'm just having problems using the latest 1.10.2 liteloader snapshot along-side a sponge-forge server.
The server successfully loads any forge mods I want, I've definitely narrowed the problem down to the liteloader mod having issues with spongeforge.
I've tried using build #16 & #13 but neither seemed to fix the issue, the logs from the server are the same.
I install liteloader by selecting "extract liteloader.jar" and placing it in the spongeforge mods/1.10.2 folder (where I've put all the other working forge mods).
Here's the fml-server-latest.log
https://pastebin.com/APPA5Jmb
Any help would be greatly appreciated, I'd love to start my server!
Liteloader is client side only
There is obviously no need to hide anything from the server, because if you're abiding by the server rules then there's really no issue. Servers can identify LiteLoader and possibly WDL if they wish to, though there are much better ways to control this kind of thing for a server's point of view.
As for your original question. I don't know of any servers that would have a legitimate reason to dislike liteloader since, like forge, it's just a platform for mods to actually load, and any servers which disliked liteloader would have identical reasons to dislike forge. Also, liteloader does not send a modlist to the server because it would be pretty pointless, but certain other network traffic could be used to identify specific mods as described above. I'm not sure "heuristics" is the right word for this kind of detection, because straightforward examimation of the incoming payload would make it obvious exactly which mod is involved.
Honestly if you adhere to any guidelines made by the server as to whether certain things are allowed or not, then there likely won't be a problem.
I make a point of making sure all the players on my server know where the "goodies" are, and how to use them as diagnostic tools and aids rather than as "cheats". I then make the point to explain, "If you cheat and ruin the game for yourself, I'll be disappointed. If you cheat and ruin the game for someone ELSE, I will be annoyed. And I usually express my displeasure in perma-bans."
I simply don't have time to worry about someone ELSE using tools *I* make available for myself for legitimate reasons. A server that feels they have to worry about this is much better off running a "Bedrock" server of Minecraft where LiteLoader, Forge, and so on are not an issue. Or run a VERY small whitelist server for worthy, mature players, as I do.
Can you update the flowchart please the instructions are not totally in line with what you see on the installer in newer versions.
I run Forge too, you?
If yes, run Forge and get it active then close it (note what version it is)
Click the LiteLoad installer (I prefer the .jar), click extend from the Forge version you just shut down and you're done.
Click the LiteLoader newly created and enjoy.
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf