コード例 #1
0
ファイル: ZyinHUD.java プロジェクト: kevinwchang/zyinhud
 /**
  * Event fired before a GUI is opened.
  *
  * @param event
  */
 @SubscribeEvent
 public void GuiOpenEvent(GuiOpenEvent event) {
   // override the default Options screen with our custom one, which contains our custom "Zyin's
   // HUD..." button
   if (event.gui instanceof GuiOptions && mc.theWorld != null) {
     event.gui = new GuiOptionsOverride(new GuiIngameMenu(), mc.gameSettings);
   }
 }
コード例 #2
0
ファイル: GuiListener.java プロジェクト: ComputerBaer/RewiMod
 @SubscribeEvent
 public void onGuiOpen(GuiOpenEvent event) {
   if (event.gui instanceof GuiMainMenu) {
     event.gui = new GuiRewiMainMenu();
   }
 }