Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

Ymzd0.png

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

  • 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.

Ymzd0.png

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

  • 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

Ymzd0.png

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

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

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...

  • 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.

Ymzd0.png

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.