Jump to content

Recommended Posts

Posted (edited)

I am susbsribing to the ModelBakeEvent event but it seems to be skipped while the game loads.

Here's how I subscribe to the event:

public class ModelBakeHandler {

//    @OnlyIn(Dist.CLIENT)
    @SubscribeEvent
    public void onModelBakeEvent(ModelBakeEvent event) {
        System.out.println("_______________");
    }
}

and register the event in my main class:

        MinecraftForge.EVENT_BUS.register(new ModelBakeHandler());

 

This is the event logs when the event gets triggered:

[17:38:18] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Firing event for modid siltblocks : net.minecraftforge.client.event.ModelBakeEvent@4d98e41b
[17:38:18] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Fired event for modid siltblocks : net.minecraftforge.client.event.ModelBakeEvent@4d98e41b
[17:38:18] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Firing event for modid forge : net.minecraftforge.client.event.ModelBakeEvent@4d98e41b
[17:38:18] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Fired event for modid forge : net.minecraftforge.client.event.ModelBakeEvent@4d98e41b

 

My "_______________" is not logged here (or ever). Any ideas why?

 

Edit: Should I ever the "OnlyIn" decorator as a modder?

Edited by than00ber1
Posted
4 minutes ago, than00ber1 said:

Any ideas why?

try to use a Logger#info instead of System.out

 

5 minutes ago, than00ber1 said:

Edit: Should I ever the "OnlyIn" decorator as a modder?

the OnlyIn annotation is only for vanilla

Posted
37 minutes ago, Luis_ST said:

try to use a Logger#info instead of System.out

 

the OnlyIn annotation is only for vanilla

Noted.

 

24 minutes ago, diesieben07 said:

What do you need ModelBakeEvent for? You should use a custom model loader instead.

I am trying to fetch Fence blocks and add an overlay to it.

 

By 

Quote

custom model loader

you mean ICustomModelLoader?

 

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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