Java Code Examples for net.minecraftforge.client.event.GuiScreenEvent#ActionPerformedEvent

The following examples show how to use net.minecraftforge.client.event.GuiScreenEvent#ActionPerformedEvent . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EventHandler.java    From VersionChecker with GNU Lesser General Public License v3.0 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onActionPerformed(GuiScreenEvent.ActionPerformedEvent evt)
{
    if (evt.getGui() instanceof GuiMainMenu)
    {
        GuiMainMenuHandler.onActionPerformed(evt.getButton());
    }
}
 
Example 2
Source File: Events.java    From ehacks-pro with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onGuiScreenAction(GuiScreenEvent.ActionPerformedEvent event) {
    if (event.button.id == 1337) {
        Wrapper.INSTANCE.mc().displayGuiScreen(new GuiMainConfig(event.gui));
    }
}
 
Example 3
Source File: MainMenuGuiService.java    From ForgeHax with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onActionPerformed(GuiScreenEvent.ActionPerformedEvent event) {
  if (event.getButton() == customButton) {
    MC.displayGuiScreen(new CommandInputGui());
  }
}