Options menu not always accessible
tennox opened this issue ยท 2 comments
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.
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(.......) );
}
}