Posted June 3, 201213 yr hi, I'm having trouble with the new FML. onTickInGUI doesn't seem to work in the menu but only ingame. It doesn't give any errors, it just starts to tick when loading a game. Is this intentional or is this a bug? If this is intentional is their an other way to do the same thing but in the menu? Thanks in advance, Crazyputje
June 3, 201213 yr Pretty sure that is the same way ModLoader does its ticking. ModLoader doesn't do any running outside the world. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 3, 201213 yr Author Risugami's modloader starts to tick when minecraft is loaded, therefore also in the menu. I've just tested it again to make sure i was correct.
June 3, 201213 yr Mind posting up a small example mod to showcase this difference. I haven't loaded up eclipse to look into it, but last I recall all of ML's ticks are called in world.doTick which doesn't exist in the main menu. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 3, 201213 yr Author An example is easily made: just print a string on each tick and watch when the spam appears. When using FML: spam starts when loading a game When using ML: spam starts when loading minecraft And modloader gets its ticks from the EnityRendererProxy (I think) package net.minecraft.src; import net.minecraft.client.Minecraft; public class EntityRendererProxy extends EntityRenderer { private Minecraft game; public EntityRendererProxy(Minecraft minecraft) { super(minecraft); game = minecraft; } /** * Will update any inputs that effect the camera angle (mouse) and then render the world and GUI */ public void updateCameraAndRender(float f) { super.updateCameraAndRender(f); ModLoader.onTick(f, game); } } updateCameraAndRender is called from runGameLoop in Minecraft.class
June 3, 201213 yr I'll have to look into this, Been a while seince I've looked at ModLoader itself, I've left it all to cpw to do all the FML stuff. And we're trying to get it as compatible as we can. So its good to get these discrepancy reports. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 3, 201213 yr Yes, I haven't looked at it yet. I haven't gone to bed yet, running on like 27 hours now. I'll look into it tomarrow. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 4, 201213 yr FYI, when I analyzed this (and I spent some time on this) I did not observe this behaviour. Can you indicate your ModLoader "inGameHook" and "inGUIHook" values please? Likely it's a small change to ModLoaderModContainer to accomodate your requirements. If you wish to grab the fml source and send a pull request...
June 4, 201213 yr Author Do you mean this? ModLoader.setInGUIHook(this, true, false); ModLoader.setInGameHook(this, true, false); I found the problem and i have removed the code that check's if the world isn't null and it worked. I requested a pull so you can see what i changed and so you can maybe implement the fix.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.