Java 类net.minecraft.client.gui.GuiIngameMenu 实例源码

项目:SAO-UI---1.8.8    文件:RenderHandler.java   
static void guiInstance(GuiOpenEvent e) {
    if (!(mc.currentScreen instanceof ScreenGUI)) {
        if (mc.currentScreen != e.gui) {
            if ((e.gui instanceof GuiIngameMenu) || ((e.gui instanceof GuiInventory) && (!OptionCore.DEFAULT_INVENTORY.getValue()))) {
                final boolean inv = (e.gui instanceof GuiInventory);

                if (mc.playerController.isInCreativeMode() && inv)
                    e.gui = new GuiContainerCreative(mc.thePlayer);
                else {
                    e.gui = new IngameMenuGUI((inv ? (GuiInventory) mc.currentScreen : null));
                }
            }
            if ((e.gui instanceof GuiGameOver) && (!OptionCore.DEFAULT_DEATH_SCREEN.getValue())) {
                if (mc.ingameGUI instanceof IngameGUI) {
                    e.gui = new DeathScreen();
                }
            }
        }
        else e.setCanceled(true);
    }
}
项目:malmo    文件:ClientStateMachine.java   
@Override
protected void execute()
{
    if (Minecraft.getMinecraft().getIntegratedServer() != null && Minecraft.getMinecraft().world != null)
    {
        // If the integrated server has been opened to the LAN, we won't be able to pause it.
        // To get around this, we need to make it think it's not open, by modifying its isPublic flag.
        if (Minecraft.getMinecraft().getIntegratedServer().getPublic())
        {
            if (!killPublicFlag(Minecraft.getMinecraft().getIntegratedServer()))
            {
                // Can't pause, don't want to risk the hang - so bail.
                episodeHasCompletedWithErrors(ClientState.ERROR_CANNOT_CREATE_WORLD, "Can not pause the old server since it's open to LAN; no way to safely create new world.");
            }
        }

        Minecraft.getMinecraft().displayGuiScreen(new GuiIngameMenu());
    }
}
项目:TeambattleMod    文件:GuiTeambattleSettings.java   
@Override
public void actionPerformed(GuiButton button) throws IOException {
    switch (button.id) {
    case 0:
        mc.displayGuiScreen(new GuiIngameMenu());
        break;
    case 2:
        TConfigs.updateShowHUD(!TConfigs.showHUD);
        button.displayString = "Show HUD: " + TConfigs.showHUD;
        break;
    case 3:
        TConfigs.updateShowEntity(!TConfigs.showEntity);
        button.displayString = "Show entity: " + TConfigs.showEntity;
        break;
    case 4:
        TConfigs.updateCustomSwordSound(!TConfigs.customSwordSound);
        button.displayString = "Custom sounds: " + TConfigs.customSwordSound;
        break;
    case 5:
        TConfigs.updateFovAtBowOrSpeed(!TConfigs.fovAtBowOrSpeed);
        button.displayString = "Change fov: " + TConfigs.fovAtBowOrSpeed;
        break;
    }

}
项目:ExternalInputUI    文件:ExternalInputUI.java   
@SubscribeEvent
public void onKey(KeyInputEvent.KeyInputEvent event){
    if(keyBinding.isPressed() && minecraft.thePlayer != null){
        synchronized(state){
            if(state)
                return;
            state = true;
        }
        minecraft.displayGuiScreen(new GuiIngameMenu());
        executor.submit(new Runnable() {
            @Override
            public void run() {
                openInputUI();
                state = false;
            }
        });
    }
}
项目:EvenWurse    文件:MenuWalkMod.java   
public boolean shouldAllowWalking() {
    // check if mod is active
    if (!isActive()) return false;

    // check if there is a player to move
    Minecraft mc = Minecraft.getMinecraft();
    if (mc.thePlayer == null) return false;

    // check if player is viewing chat
    if ((mc.currentScreen instanceof GuiChat) || (mc.currentScreen instanceof GuiIngameMenu) ||
            (mc.currentScreen instanceof NavigatorScreen)) {
        return false;
    }

    // check if inventory key is pressed
    return !Keyboard.isKeyDown(mc.gameSettings.keyBindInventory.getKeyCode());
}
项目:SAO-UI---1.8.8    文件:RenderHandler.java   
static void guiInstance(GuiOpenEvent e) {
    if (!(mc.currentScreen instanceof ScreenGUI)) {
        if (mc.currentScreen != e.gui) {
            if ((e.gui instanceof GuiIngameMenu) || ((e.gui instanceof GuiInventory) && (!OptionCore.DEFAULT_INVENTORY.getValue()))) {
                final boolean inv = (e.gui instanceof GuiInventory);

                if (mc.playerController.isInCreativeMode() && inv)
                    e.gui = new GuiContainerCreative(mc.thePlayer);
                else {
                    e.gui = new IngameMenuGUI((inv ? (GuiInventory) mc.currentScreen : null));
                }
            }
            if ((e.gui instanceof GuiGameOver) && (!OptionCore.DEFAULT_DEATH_SCREEN.getValue())) {
                if (mc.ingameGUI instanceof IngameGUI) {
                    e.gui = new DeathScreen();
                }
            }
        }
        else e.setCanceled(true);
    }
}
项目:motecraft    文件:GuiWiimoteStatus.java   
@SubscribeEvent
public void onDraw(GuiScreenEvent.DrawScreenEvent.Post event) {
    if (event.gui instanceof GuiMainMenu
            || event.gui instanceof GuiIngameMenu) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDisable(GL11.GL_LIGHTING);
        if (MoteCraft.mote == null) {
            this.mc.renderEngine.bindTexture(new ResourceLocation(
                    MoteCraft.MODID, String.format("wiimote_search%02d.png",
                            this.animstate / 3)));
        } else {
            this.mc.renderEngine.bindTexture(new ResourceLocation(
                    MoteCraft.MODID, "wiimote_found.png"));
        }
        /*
         * this.drawTexturedModalRect( 0, 0, 0, 0, 230, 1000);
         */
        Utils.drawTexturedQuadFit(10, 10, 32, 32, zLevel + 1);
    }
}
项目:DecompiledMinecraft    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:BaseClient    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:BaseClient    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu() {
    if (this.currentScreen == null) {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic()) {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:Proyecto-DASI    文件:ClientStateMachine.java   
@Override
protected void execute()
{
    if (Minecraft.getMinecraft().getIntegratedServer() != null && Minecraft.getMinecraft().theWorld != null)
    {
        // If the integrated server has been opened to the LAN, we won't be able to pause it.
        // To get around this, we need to make it think it's not open, by modifying its isPublic flag.
        if (Minecraft.getMinecraft().getIntegratedServer().getPublic())
        {
            if (!killPublicFlag(Minecraft.getMinecraft().getIntegratedServer()))
            {
                // Can't pause, don't want to risk the hang - so bail.
                episodeHasCompletedWithErrors(ClientState.ERROR_CANNOT_CREATE_WORLD, "Can not pause the old server since it's open to LAN; no way to safely create new world.");
            }
        }

        Minecraft.getMinecraft().displayGuiScreen(new GuiIngameMenu());
    }
}
项目:Proyecto-DASI    文件:ClientStateMachine.java   
@Override
protected void execute()
{
    if (Minecraft.getMinecraft().getIntegratedServer() != null && Minecraft.getMinecraft().theWorld != null)
    {
        // If the integrated server has been opened to the LAN, we won't be able to pause it.
        // To get around this, we need to make it think it's not open, by modifying its isPublic flag.
        if (Minecraft.getMinecraft().getIntegratedServer().getPublic())
        {
            if (!killPublicFlag(Minecraft.getMinecraft().getIntegratedServer()))
            {
                // Can't pause, don't want to risk the hang - so bail.
                episodeHasCompletedWithErrors(ClientState.ERROR_CANNOT_CREATE_WORLD, "Can not pause the old server since it's open to LAN; no way to safely create new world.");
            }
        }

        Minecraft.getMinecraft().displayGuiScreen(new GuiIngameMenu());
    }
}
项目:Zombe-Modpack    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:EMC    文件:EventGuiScreenDraw.java   
public boolean instanceOf(CommonScreenTypes type) {
    if (type.equals(CommonScreenTypes.GuiDisconnected)) {
        return screen instanceof GuiDisconnected;
    } else if (type.equals(CommonScreenTypes.GuiIngameMenu)) {
        return screen instanceof GuiIngameMenu;
    }
    return false;
}
项目:Backmemed    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:RewiMod    文件:GuiHandler.java   
@SubscribeEvent
public void onOpenGui(GuiOpenEvent event) {
    if (event.gui instanceof GuiMainMenu) {
        event.gui = new RewiMainMenu();
    }
    if (event.gui instanceof GuiIngameMenu) {
        event.gui = new RewiIngameMenu();
    }
    if (event.gui instanceof GuiOptions) {
        event.gui = new RewiOptionsMenu(Minecraft.getMinecraft().currentScreen, Minecraft.getMinecraft().gameSettings);
    }
}
项目:Controller-Support    文件:ModEventHandler.java   
@SubscribeEvent
public void onInitGuiScreen(GuiScreenEvent.InitGuiEvent.Post event) {
    if (active) {
        LabelButtonInfo.inject(event.getGui());
        if (event.getGui() instanceof GuiIngameMenu) {
            event.getButtonList().add(new GuiButton(200, (event.getGui().width / 2) - 100, event.getGui().height - 20, I18n.format("gui.controller")));
        }
        if (event.getGui() instanceof GuiMainMenu) {
            this.selector = new GuiButtonSelector(event.getGui().width / 2, event.getGui().height / 2 + 30, 40, event.getButtonList().toArray(new GuiButton[0]));
            event.getButtonList().clear();
        }
        if (event.getButtonList().size() != 0)
            ActionButtonChange.moveMouse(new Wrapper(event.getButtonList().get(0)), event.getGui().width, event.getGui().height);
    }
}
项目:TeambattleMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onGuiScreenonInitGui(GuiScreenEvent.InitGuiEvent event) {
    if (event.gui instanceof GuiIngameMenu) {
        GuiIngameMenu menue = (GuiIngameMenu) event.gui;
        event.buttonList.add(new GuiButton(20, menue.width / 2 - 100, menue.height / 4 + 128, 200, 20, "Teambattle Settings"));
    }
}
项目:TaleCraft    文件:InfoBar.java   
public boolean canDisplayInfoBar(Minecraft mc, ClientProxy clientProxy) {
    if(!clientProxy.isBuildMode())
        return false;

    if(mc.currentScreen == null)
        return true;

    if(mc.currentScreen instanceof GuiIngameMenu)
        return true;

    if(mc.currentScreen instanceof GuiChat)
        return true;

    return false;
}
项目:OpenFM    文件:OpenFM.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
public void onEvent(GuiOpenEvent event) {
    if (event.gui instanceof GuiIngameModOptions) {
        event.gui = new GuiModList(new GuiIngameMenu());
    }
}
项目:Resilience-Client-Source    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.func_147689_b();
        }
    }
}
项目:ExpandedRailsMod    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:Cauldron    文件:Minecraft.java   
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:Cauldron    文件:Minecraft.java   
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.mcSoundHandler.pauseSounds();
        }
    }
}
项目:RuneCraftery    文件:Minecraft.java   
public void func_71385_j() {
   if(this.field_71462_r == null) {
      this.func_71373_a(new GuiIngameMenu());
      if(this.func_71356_B() && !this.field_71437_Z.func_71344_c()) {
         this.field_71416_A.func_82466_e();
      }

   }
}
项目:RuneCraftery    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.sndManager.pauseAllSounds();
        }
    }
}
项目:Battlegear2    文件:ModUpdateDetectorTickHandeler.java   
@SubscribeEvent
public void onPostInitGui(GuiScreenEvent.InitGuiEvent.Post event) {
    if(event.getGui() instanceof GuiIngameMenu || event.getGui() instanceof GuiModList){
        int x = event.getGui().width / 2 + 105;
        int y = event.getGui().height / 4 + 8;
        if(event.getGui() instanceof GuiModList){
            x = event.getGui().width - 110;
            y = 10;
        }
        event.getButtonList().add(new GuiModUpdateButton(BUTTON_ID, x, y, event.getGui()));
    }
}
项目:BetterNutritionMod    文件:Minecraft.java   
/**
 * Displays the ingame menu
 */
public void displayInGameMenu()
{
    if (this.currentScreen == null)
    {
        this.displayGuiScreen(new GuiIngameMenu());

        if (this.isSingleplayer() && !this.theIntegratedServer.getPublic())
        {
            this.sndManager.pauseAllSounds();
        }
    }
}
项目:secri    文件:HDKeyHandler.java   
@Override
     public void keyDown(EnumSet<TickType> types, KeyBinding kb,
                     boolean tickEnd, boolean isRepeat) {
         Minecraft mc = ModLoader.getMinecraftInstance();
if(mc.theWorld!=null && mc.currentScreen instanceof GuiIngameMenu){
    HDSkinHandler.forceUpdateSkins(mc.theWorld);
}

     }
项目:CustomWorldGen    文件:FMLClientHandler.java   
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
{
    showGuiScreen(new GuiModList(guiIngameMenu));
}
项目:MacroKey    文件:GuiEventHandler.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void actionPreformed(GuiScreenEvent.ActionPerformedEvent.Post event) {
    GuiScreen gui = event.getGui();

    if (gui instanceof GuiOptions) {
        if(event.getButton().id == Reference.MACROKEY_OPTIONS_BUTTON){
            Minecraft.getMinecraft().displayGuiScreen(new GuiManageKeybindings(gui, Minecraft.getMinecraft().gameSettings));

        }
    }
    if(gui instanceof GuiIngameMenu){
        if(event.getButton().id == Reference.MACROKEY_INGAME_LAYER_TOGGLE) {

            currentSelectedLayer++;

            if(currentSelectedLayer< MacroKey.instance.layers.size()) {
                event.getButton().displayString = "Layer: " + MacroKey.instance.layers.get(currentSelectedLayer).getDisplayName();
                Layer.setActiveLayer(MacroKey.instance.layers.get(currentSelectedLayer));

            }else if(currentSelectedLayer+1>=MacroKey.instance.layers.size()){
                currentSelectedLayer=-1;
                event.getButton().displayString = "Layer: Master";
                Layer.setActiveLayer(null);

            }
        }
    }
}
项目:TRHS_Club_Mod_2016    文件:FMLClientHandler.java   
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
{
    showGuiScreen(new GuiIngameModOptions(guiIngameMenu));
}
项目:Controller-Support    文件:ModEventHandler.java   
@SubscribeEvent
public void onGuiScreenButtonPress(GuiScreenEvent.ActionPerformedEvent.Post event) {
    if (active) {
        if (event.getGui() instanceof GuiIngameMenu) {
            if (event.getButton().id == 200) {
                Minecraft.getMinecraft().displayGuiScreen(new GuiScreenControllerHelp(event.getGui()));
            }
        }
    }
}
项目:TeambattleMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onGuiScreenonActionPerformed(GuiScreenEvent.ActionPerformedEvent event) {
    if (event.gui instanceof GuiIngameMenu) {
        if (event.button.id == 20) {
            event.gui.mc.displayGuiScreen(new GuiTeambattleSettings());
        }
    }
}
项目:ToggleSneak    文件:ToggleSneakEvents.java   
@SubscribeEvent
public void GuiOpenEvent(GuiOpenEvent event)
{
    if(event.gui instanceof GuiOptions && mc.theWorld != null)
    {
        event.gui = new GuiOptionsReplace(new GuiIngameMenu(), mc.gameSettings);
    }
}
项目:CauldronGit    文件:FMLClientHandler.java   
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
{
    showGuiScreen(new GuiIngameModOptions(guiIngameMenu));
}
项目:mcpvp-mod    文件:AllRender.java   
public static void onRender(RenderGameOverlayEvent event) {

    // If this doesn't render during the TEXT phase, other displays will be screwed up due to OpenGL settings.
    if (!ServerHelper.onMCPVP() || event.type != RenderGameOverlayEvent.ElementType.TEXT) return;

    // Draw the split chat.
    Main.secondChat.drawChat(Main.mc.ingameGUI.getUpdateCounter());

    // Prevent everything else from being rendered when debug is showing.
    if (Main.mc.gameSettings.showDebugInfo) return;

    // Render the armor display.
    if (ConfigHUD.showArmor || (Data.get("showArmor") != null && Boolean.valueOf(Data.get("showArmor")))) {
        Main.start("mcpvp", "armorDisplay");
        Main.armorDisplay.renderArmor();
        Main.end(2);
    }

    // Render the potion display.
    if (ConfigHUD.showPotion || (Data.get("showPotion") != null && Boolean.valueOf(Data.get("showPotion")))) {
        Main.start("mcpvp", "potionDisplay");
        Main.potionDisplay.displayPotions(event);
        PotionDisplay.displayStrings();
        Main.end(2);
    }

    // Outline the current Selectable.
    if (Selectable.selected != null)
        Selectable.selected.outline();

    // Hi-jack the GuiIngameMenu and inject a new one.
    if (Main.mc.currentScreen instanceof GuiIngameMenu)
        Main.mc.displayGuiScreen(new GuiIngameMCPVP());

    // Checking the time imposes a limit to the frequency of the event.
    if (ConfigHUD.fixSkins && System.currentTimeMillis() % 10 == 0)  {
        Main.start("mcpvp", "skinFixer");
        fixSkins();
        Main.end(2);
    }

    // Display all InfoBoxes for the current Server and State.
    Main.start("mcpvp", "infoBox");
    InfoBox.displayAll(Server.getServer(), Server.getState());
    Main.end(2);
}
项目:forge_world_downloader    文件:WDLTickHandler.java   
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData)
{
    final Minecraft mc = Minecraft.getMinecraft();
    tick_count++;

    if (mc.currentScreen != null)
    {
        if ( (mc.currentScreen instanceof GuiIngameMenu) && ! (mc.currentScreen instanceof WDLGuiIngameMenuExtend))
        {
            mc.currentScreen = new WDLGuiIngameMenuExtend(mc.currentScreen);
        }
        //System.out.println(mc.currentScreen.getClass().getName());

    }
    /*if (!started)
    {
        mc.ingameGUI = new GuiIngameCustom(mc); // Just put in your custom gui
                                                                                        // instead of GuiIngameCustom ;)
        started = true;
    }*/

    /*WDL>>>*/
   if( WDL.guiToShowAsync != null )
   {
       mc.displayGuiScreen( WDL.guiToShowAsync );
       WDL.guiToShowAsync = null;
   }
   if( WDL.downloading )
   {
       if( WDL.tp.openContainer != WDL.windowContainer )
       {
           if( WDL.tp.openContainer == WDL.tp.inventoryContainer )
               WDL.onItemGuiClosed();
           else
               WDL.onItemGuiOpened();
           WDL.windowContainer = WDL.tp.openContainer;
       }
   }
   /*<<<WDL*/
}
项目:Cauldron    文件:FMLClientHandler.java   
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
{
    showGuiScreen(new GuiIngameModOptions(guiIngameMenu));
}
项目:Cauldron    文件:FMLClientHandler.java   
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
{
    showGuiScreen(new GuiIngameModOptions(guiIngameMenu));
}