CustomSelectionBox

CustomSelectionBox

53.4k Downloads

Options menu not always accessible

tennox opened this issue ยท 2 comments

commented

There has to be a better way.

darkk6 reported, he sees the button in main menu settings, but not ingame:
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1295169-tennox-mods?comment=81

Generally it doesn't seem to be a safe way.

commented

Use

@SubscribeEvent
public void InitGuiEventPost(GuiScreenEvent.InitGuiEvent.Post event){ }

instead of

@SubscribeEvent
public void onTick(TickEvent event){}

( in CSBClientProxy.java )

Can solve this problem.

example :

@SubscribeEvent
public void InitGuiEventPost(GuiScreenEvent.InitGuiEvent.Post event) {
    if(event.gui != null && event.gui instanceof GuiOptions ){
        event.buttonList.add( new CSBButton(.......) );
    }
}
commented

Hey, thanks. I didn't know about that hook, very neat :)

I will use it.

On Fri, Dec 25, 2015, 08:37

darkk6

wrote:

Use

InitGuiEventPost

instead of

TickEvent

( in CSBClientProxy.java )