Java 类net.minecraftforge.client.event.GuiOpenEvent 实例源码

项目:ForgeHax    文件:AutoReconnectMod.java   
@SubscribeEvent
public void onGuiOpened(GuiOpenEvent event) {
    if (!hasAutoLogged)
    if(event.getGui() instanceof GuiDisconnected &&
            !(event.getGui() instanceof GuiDisconnectedOverride)) {
        updateLastConnectedServer();
        GuiDisconnected disconnected = (GuiDisconnected)event.getGui();
        event.setGui(new GuiDisconnectedOverride(
                FastReflection.Fields.GuiDisconnected_parentScreen.get(disconnected),
                "connect.failed",
                FastReflection.Fields.GuiDisconnected_message.get(disconnected),
                FastReflection.Fields.GuiDisconnected_reason.get(disconnected),
                delay.get()
        ));
    }
}
项目:UniversalRemote    文件:HookedClientWorldEventSync.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onGuiOpenEvent(GuiOpenEvent event)
{
    if (event.getGui() == null)
    {
        // a gui has been closed -- reset remote gui

        if (Minecraft.getMinecraft().world instanceof HookedClientWorld)
        {
            ((HookedClientWorld)Minecraft.getMinecraft().world).ClearRemoteGui();
        }
        else
        {
            Util.logger.error("Minecraft.getMinecraft().world is not instance of RemoteGuiEnabledClientWorld!");
        }
    }
}
项目: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);
    }
}
项目:Ding    文件:Ding.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onGuiOpen(GuiOpenEvent event)
{
    if(event.getGui() instanceof GuiMainMenu && !played)
    {
        played = true;
        if(playOn == 1 || playOn == 3)
        {
            SoundEvent sound = SoundEvent.REGISTRY.getObject(new ResourceLocation(name));
            if(sound != null)
            {
                Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(sound, (float)pitch));
            }
            else
            {
                logger.log(Level.WARN, "Could not find sound: %s", new ResourceLocation(name));
            }
        }
    }
}
项目:CrystalMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    GuiScreen gui = event.getGui();
    if(gui !=null && gui instanceof GuiScreenHorseInventory){
        GuiScreenHorseInventory horseGui = (GuiScreenHorseInventory)gui;
        EntityHorse horse = (EntityHorse)ReflectionUtils.getPrivateValue(horseGui, GuiScreenHorseInventory.class, ObfuscatedNames.GuiScreenHorseInventory_horseEntity);
        if(horse !=null && HorseAccessories.hasEnderChest(horse)){
            ContainerHorseChest animalchest = new ContainerHorseChest("HorseChest", 2);
            animalchest.setCustomName(horse.getName());
            event.setGui(new GuiHorseEnderChest(CrystalMod.proxy.getClientPlayer().inventory, animalchest, horse));
            PacketGuiMessage pkt = new PacketGuiMessage("Gui");
            pkt.setOpenGui(GuiHandler.GUI_ID_ENTITY, horse.getEntityId(), 0, 0);
            CrystalModNetwork.sendToServer(pkt);
        }
    }
}
项目:DynamicSurroundings    文件:HumDinger.java   
@SubscribeEvent
public static void onGuiOpen(@Nonnull final GuiOpenEvent event) {
    if (!hasPlayed && event.getGui() instanceof GuiMainMenu) {
        hasPlayed = true;
        final String[] possibles = ModOptions.startupSoundList;
        if (possibles == null || possibles.length == 0)
            return;
        final String res = possibles[XorShiftRandom.current().nextInt(possibles.length)];
        if (!StringUtils.isEmpty(res)) {
            final SoundEvent se = SoundEvent.REGISTRY.getObject(new ResourceLocation(res));
            if (se != null)
                SoundEngine.instance().playSound(new AdhocSound(se, SoundCategory.MASTER));
            else
                DSurround.log().warn("Unable to locate startup sound [%s]", res);
        } else {
            DSurround.log().warn("Improperly formatted startup sound list!");
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:ClientEventHandler.java   
@SubscribeEvent
    public void onGuiOpen(GuiOpenEvent event)
    {
//      if (event.gui instanceof GuiMainMenu)
//      {   
//          {
//              
//          }
//      }
        if (event.gui instanceof GuiGameOver)
        {
            GuiFNAFGameOver.ticksElapsed = 0;
            mc.getSoundHandler().stopSounds();

            if (!mc.getSoundHandler().isSoundPlaying(FNAFSoundHandler.deathStatic))
            {
                mc.getSoundHandler().playSound(FNAFSoundHandler.deathStatic);
            }
        }
    }
项目:NotEnoughItems    文件:NEIClientEventHandler.java   
@SubscribeEvent
public void guiOpenEvent(GuiOpenEvent event) {
    if (event.getGui() instanceof GuiContainer) {
        if (lastGui != event.getGui()) {
            if (event.getGui() == null) {
                instanceTooltipHandlers = null;
            } else {
                instanceTooltipHandlers = new LinkedList<>();
                if (event.getGui() instanceof IContainerTooltipHandler) {
                    instanceTooltipHandlers.add(((IContainerTooltipHandler) event.getGui()));
                }
                instanceTooltipHandlers.addAll(tooltipHandlers);
            }
            lastGui = event.getGui();
        }
    }
}
项目: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());
    }
}
项目:EnderCore    文件:EventHandlerGui.java   
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event) {
  if (event.gui == null) {
    return;
  }
  try {
    if (event.gui.getClass() == GuiModList.class) {
      event.setCanceled(true);
      Minecraft.getMinecraft().displayGuiScreen(new GuiEnhancedModList((GuiScreen) _mainMenu.get(event.gui)));
    }
    if (event.gui.getClass() == GuiIngameModOptions.class) {
      event.setCanceled(true);
      Minecraft.getMinecraft().displayGuiScreen(new GuiEnhancedModList((GuiScreen) _parentScreen.get(event.gui)));
    }
  } catch (Exception e) {
    Throwables.propagate(e);
  }
}
项目:sprinkles_for_vanilla    文件:ClientHandlers.java   
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    GuiScreen gui = event.gui;
    if (!Settings.autoRespawn)
    {
        return;
    }
    if (gui instanceof GuiGameOver && !hasClicked)
    {
        Minecraft mc = Minecraft.getMinecraft();
        if (!mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
        {
            hasClicked = true;
            mc.thePlayer.respawnPlayer();
            mc.displayGuiScreen((GuiScreen) null);
            event.setCanceled(true);
        }
    }
    else if (!(gui instanceof GuiGameOver) && hasClicked)
    {
        hasClicked = false;
    }
}
项目:enderutilities    文件:GuiEventHandler.java   
@SubscribeEvent
public void onGuiOpenEvent(GuiOpenEvent event)
{
    // Reset the scrolling modifier when the player opens a GUI.
    // Otherwise the key up event will get eaten and our scrolling mode will get stuck on
    // until the player sneaks again.
    // FIXME Apparently there are key input events for GUI screens in 1.8,
    // so this probably can be removed then.
    InputEventHandler.resetModifiers();

    // Opening the player's Inventory GUI
    if (event.getGui() != null && event.getGui().getClass() == GuiInventory.class)
    {
        EntityPlayer player = FMLClientHandler.instance().getClientPlayerEntity();

        if (this.handyBagShouldOpen && player != null && ItemHandyBag.getOpenableBag(player).isEmpty() == false)
        {
            if (event.isCancelable())
            {
                event.setCanceled(true);
            }

            PacketHandler.INSTANCE.sendToServer(new MessageOpenGui(player.dimension, ReferenceGuiIds.GUI_ID_HANDY_BAG));
        }
    }
}
项目:dragon-mounts    文件:DragonSplash.java   
@SubscribeEvent
public void onOpenGui(GuiOpenEvent evt) {
    GuiScreen gui = evt.getGui();
    if (gui instanceof GuiMainMenu) {
        try {
            GuiMainMenu menu = (GuiMainMenu) gui;
            String splash = mainMenuGetSplashText(menu);
            if (splash.equals("Kind of dragon free!")) {
                splash = "Not really dragon free!";
                mainMenuSetSplashText(menu, splash);
            } else if (splashLines != null && !splashLines.isEmpty() && rand.nextInt(10) == 0) {
                splash = splashLines.get(rand.nextInt(splashLines.size()));
                mainMenuSetSplashText(menu, splash);
            }
        } catch (Throwable t) {
            L.warn("Can't override splash", t);
        }
    }
}
项目:TooManyDanyOres    文件:Warnings.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void openMainMenu(GuiOpenEvent e)
{
    if (e.gui instanceof GuiMainMenu && Config.replacements.isEmpty() && Config.itemReplacements.isEmpty())
    {
        File file = new File(configDir, Refs.MOD_ID + "_data");
        if (!file.exists())
        {
            try
            {
                file.createNewFile();
            }
            catch (Throwable t)
            {
                TooManyDanyOres.logger.warn("Unable to create a data file!");
                TooManyDanyOres.logger.catching(t);
            }

            e.gui = new GuiStartupWarning((GuiMainMenu)e.gui);

            MinecraftForge.EVENT_BUS.unregister(this);
        }
    }
}
项目:TPPI-Tweaks    文件:TPPIEventHandler.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onGui(GuiOpenEvent event)
{
    if (event.gui instanceof GuiMainMenu)
    {
        if (shouldLoadGUI && ConfigurationHandler.showIRCGui)
        {
            event.gui = new IRCGui();
            shouldLoadGUI = false;
        }
        else
        {
            ObfuscationReflectionHelper.setPrivateValue(GuiMainMenu.class, (GuiMainMenu) event.gui, getRandTPPISplash(), "splashText", "field_73975_c");
        }
    }
}
项目:HardcoreRevival    文件:TeamUpAddon.java   
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onOpenGui(GuiOpenEvent event) {
    Minecraft mc = Minecraft.getMinecraft();
    if (mc.player != null && mc.player.getHealth() <= 0f) {
        mc.player.setSneaking(false);
        if (event.getGui() instanceof GuiChat && mc.gameSettings.keyBindSneak.isKeyDown()) {
            event.setGui(new GuiChat("/team "));
        }
    }
}
项目:HardcoreRevival    文件:ClientProxy.java   
@SubscribeEvent
public void onOpenGui(GuiOpenEvent event) {
    Minecraft mc = Minecraft.getMinecraft();
    if (mc.player != null) {
        if (event.getGui() instanceof GuiGameOver && isKnockedOut && !acceptedDeath) { // Minor hack: isKnockedOut is always set AFTER the game over screen pops up, so we can abuse that here
            event.setGui(null);
        } else if (isKnockedOut && event.getGui() instanceof GuiInventory) {
            event.setGui(null);
        }
    }
}
项目:Proyecto-DASI    文件:MalmoModClient.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onEvent(GuiOpenEvent event)
{
    if (event.gui instanceof GuiIngameModOptions)
    {
        event.gui = new MalmoModGuiOptions.MalmoModGuiScreen(null);        
    }
}
项目:Proyecto-DASI    文件:MalmoModClient.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onEvent(GuiOpenEvent event)
{
    if (event.gui instanceof GuiIngameModOptions)
    {
        event.gui = new MalmoModGuiOptions.MalmoModGuiScreen(null);        
    }
}
项目:Visualize    文件:ClientEventHandler.java   
@SubscribeEvent
public void guiInit(GuiOpenEvent e) {
    if(e.getGui() instanceof GuiVideoSettings) {
        e.setGui(new GuiNewVideoSettings(Minecraft.getMinecraft().currentScreen, Minecraft.getMinecraft().gameSettings));
    } else if(e.getGui() instanceof GuiOptions) {
        e.setGui(new GuiNewOptions(((GuiOptions) e.getGui()).lastScreen, Minecraft.getMinecraft().gameSettings));
    }
}
项目:MidgarCrusade    文件:GuiIngameOverlay.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onGuiOpen(GuiOpenEvent event)
{
    if (event.gui instanceof GuiInventory)
    {

    }
}
项目:jGui    文件:VanillaGuiScreen.java   
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onGuiClosed(GuiOpenEvent event) {
    MinecraftForge.EVENT_BUS.unregister(this);

    if (active) {
        active = false;
        getSuperMcGui().onGuiClosed();
    }
}
项目:placementpreview    文件:RenderEventHandler.java   
@SubscribeEvent
public void onOpenGui(GuiOpenEvent event)
{
    if (TickHandler.getInstance().fakeUseInProgress())
    {
        event.setCanceled(true);
    }
}
项目:Inventory-Power    文件:RenderModeButtonsTickEvent.java   
@SubscribeEvent
public void guiOpenEvent(GuiOpenEvent event){
    System.out.println(event.getGui());
    if(event.getGui() instanceof GuiInventory){
        event.setCanceled(true);
        Minecraft.getMinecraft().thePlayer.openGui(Main.instance, 21, Minecraft.getMinecraft().theWorld, (int) Minecraft.getMinecraft().thePlayer.posX, (int) Minecraft.getMinecraft().thePlayer.posY, (int) Minecraft.getMinecraft().thePlayer.posZ);
    }
}
项目:blockbuster    文件:MainMenuHandler.java   
/**
 * Refresh models, skins and morphs upon entering in Metamorph and/or
 * Blockbuster GUIs.
 */
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    if (!Blockbuster.proxy.config.auto_refresh_models)
    {
        return;
    }

    GuiScreen gui = event.getGui();

    boolean isMetamorph = gui instanceof GuiCreativeMenu || gui instanceof GuiSurvivalMenu;
    boolean isBlockbuster = gui instanceof GuiDirector || gui instanceof GuiActor;
    boolean exitME = gui == null && Minecraft.getMinecraft().currentScreen instanceof GuiModelEditor;

    if (isMetamorph || isBlockbuster || exitME)
    {
        /* Reload models and skin */
        ModelPack pack = Blockbuster.proxy.models.pack;

        if (pack == null)
        {
            pack = Blockbuster.proxy.getPack();

            if (Minecraft.getMinecraft().isSingleplayer())
            {
                pack.addFolder(DimensionManager.getCurrentSaveRootDirectory() + "/blockbuster/models");
            }
        }

        Blockbuster.proxy.loadModels(pack);
        ClientProxy.actorPack.pack.reload();
    }
}
项目:blockbuster    文件:CameraHandler.java   
@Method(modid = "aperture")
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    if (Minecraft.getMinecraft().thePlayer == null)
    {
        return;
    }

    GuiScreen current = Minecraft.getMinecraft().currentScreen;
    GuiScreen toOpen = event.getGui();
    BlockPos pos = getDirectorPos();

    if (pos != null)
    {
        int tick = ClientProxy.cameraEditor.scrub.value;

        if (current != ClientProxy.cameraEditor && toOpen instanceof GuiCameraEditor)
        {
            /* Camera editor opens */
            CameraHandler.tick = tick;

            if (CameraHandler.reload)
            {
                Dispatcher.sendToServer(new PacketDirectorPlay(pos, PacketDirectorPlay.START, tick));
            }

            Dispatcher.sendToServer(new PacketRequestLength(pos));
        }
    }
}
项目:TextureDump    文件:TextureDump.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onMainMenuOpen(GuiOpenEvent event) {
    if (!dumped && event.getGui() instanceof GuiMainMenu) {
        dumped = true;
        TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
        for (Map.Entry<ResourceLocation, ITextureObject> entry : textureManager.mapTextureObjects.entrySet()) {
            ITextureObject textureObject = entry.getValue();
            if (textureObject instanceof TextureMap) {
                String name = entry.getKey().toString().replace(':', '_').replace('/', '_');
                dumpTextureMap((TextureMap) textureObject, name);
            }
        }
    }
}
项目:New-Menu    文件:NewMenuHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void openMainMenu(GuiOpenEvent event) throws IOException {
    if (event.gui instanceof GuiMainMenu) {
        event.gui = new NewMenu();
    }
}
项目:geomastery    文件:ClientEvents.java   
/** Alters which vanilla Gui is opened. */
@SubscribeEvent
public void guiOpen(GuiOpenEvent event) {

    EntityPlayer player = Minecraft.getMinecraft().player;

    if (event.getGui() instanceof
            net.minecraft.client.gui.inventory.GuiInventory &&
            player.inventoryContainer instanceof ContainerInventory) {

        event.setGui(new jayavery.geomastery.gui.GuiInventory(
                (ContainerInventory) player.inventoryContainer));
    }
}
项目:EnchantmentRevealer    文件:Events.java   
@SubscribeEvent
public void onGui(GuiOpenEvent event) {
    if (event.getGui() == null || !GuiEnchantment.class.equals(event.getGui().getClass())) {
        // Only hook the enchantment GUI. We don't use instanceof, because we *only* want to
        // hook the unmodified GUI.
        return;
    }
    event.setGui(GuiEnchantmentWrapper.wrap((GuiEnchantment) event.getGui(), worker, lastInteractPos));
}
项目:DiscordCE    文件:MinecraftEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onPlayerDeathImage(GuiOpenEvent e)
{
    EntityPlayer player = Minecraft.getMinecraft().thePlayer;

    if (!(e.getGui() instanceof GuiGameOver)
            || !Config.demiseImage
            || player == null
            || player.getHealth() <= 0F)
        return;

    // Getting discord and minecraft user
    try
    {
        User me = DiscordCE.client.getUserById(DiscordCE.client.getSelfInfo().getId());
        Minecraft mc = Minecraft.getMinecraft();
        ITextComponent t = ScreenShotHelper.saveScreenshot(mc.mcDataDir,
                mc.displayWidth,
                mc.displayHeight,
                mc.getFramebuffer());
        String fileName = new JSONObject(TextComponentBase.Serializer.componentToJson(t)).getJSONArray("with")
                .getJSONObject(0).getJSONObject("clickEvent").getString("value");
        File file = new File(fileName);
        TextChannel c = DiscordCE.client.getTextChannelById(Preferences.i.usingChannel);

        // Doing checks
        if (c == null || !c.checkPermission(me, Permission.MESSAGE_ATTACH_FILES))
            return;

        //Sending file
        c.sendFileAsync(file, null, m -> file.delete());
    }

    catch (Exception e1)
    {
        e1.printStackTrace();
    }
}
项目:SAO-UI---1.8    文件:RenderHandler.java   
static void mainMenuGUI(GuiOpenEvent e) {
    if (menuGUI)
        if (e.gui instanceof GuiMainMenu)
            if (StartupGUI.shouldShow()) {
                e.gui = new StartupGUI();
                menuGUI = false;
            }
            else if (e.gui instanceof GuiMainMenu)
                e.gui = new MainMenuGUI();
}
项目:TaleCraft    文件:ClientProxy.java   
@SubscribeEvent
public void npcTradeOpen(GuiOpenEvent event){
    if(event.getGui() instanceof GuiMerchant){
        if(((GuiMerchant) event.getGui()).getMerchant() instanceof NPCShop){
            lastOpened = (NPCShop) ((GuiMerchant) event.getGui()).getMerchant();
        }else{
            Minecraft mc = Minecraft.getMinecraft();
            event.setGui(new GuiNPCMerchant(mc.player.inventory, lastOpened, mc.world));
        }
    }
}
项目:DrawersBits    文件:BitDrawers.java   
@SubscribeEvent
@SideOnly( Side.CLIENT )
public void openMainMenu(final GuiOpenEvent event ) {
    // if the max shades has changed in form the user of the new usage.
    if ((!detectedSdVersion.equals(config.lastSDVersionWarned)) && (sdMajorMismatch || sdMinorMismatch || sdVersionCheckFailed)) {
        event.setGui(new GuiScreenStartup());
    }
}
项目:Creator    文件:ClientEventHandler.java   
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event) {
    if (allowNext) {
        allowNext = false;
        return;
    }

    if (event.gui instanceof GuiContainerCreative) {
        event.gui = new GuiBetterCreative(Minecraft.getMinecraft().thePlayer);
    }
}
项目:Coherence    文件:UpdateHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void checkMainMenu(GuiOpenEvent event) {
    String update = getUpdate();
    if (event.getGui() instanceof GuiMainMenu && update != null) {
        event.setGui(new UiUpdate(event.getGui(), update));
        MinecraftForge.EVENT_BUS.unregister(this);
    }
}
项目:Coherence    文件:MultiplayerHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void checkMultiplayer(GuiOpenEvent event) {
    System.out.println("Checking for multiplayer.");
    if (event.getGui() instanceof GuiMultiplayer)
        event.setGui(new UiMultiplayer(new GuiMainMenu()));
}
项目:morecommands    文件:PatchChatGui.java   
@Override
public <T extends Event> boolean applyForgeEventPatch(T e) {
    GuiOpenEvent event = (GuiOpenEvent) e;
    String prefilledText = ReflectionHelper.get(ObfuscatedField.GuiChat_defaultInputFieldText, (net.minecraft.client.gui.GuiChat) event.getGui());

    if (event.getGui() instanceof net.minecraft.client.gui.GuiSleepMP) event.setGui(new GuiSleepMP());
    else event.setGui(prefilledText == null ? new GuiChat() : new GuiChat(prefilledText));

    PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(this.displayName, true);
    return true;
}
项目:morecommands    文件:PatchEntityPlayerSP.java   
private boolean applyGuiOpenPatches(GuiOpenEvent event) {
    if (event.getGui() instanceof GuiMainMenu && this.startupServerName != null) {
        GuiScreen screen = connectToServerAtStartup(this.startupServerName, this.startupServerPort);
        this.startupServerName = null;

        if (screen == null) {
            FMLClientHandler.instance().connectToServerAtStartup(this.startupServerName, this.startupServerPort);
            PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(this.displayName, false);
            return false;
        }
        else {
            event.setGui(screen);

            PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(this.displayName, true);
            return true;
        }
    }
    else if (event.getGui() instanceof net.minecraft.client.gui.GuiMultiplayer) {
        if (parentScreenField == null) {
            PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(this.displayName, false);
            return false;
        }

        GuiScreen parentScreen = ReflectionHelper.get(ObfuscatedField.GuiMultiplayer_parentScreen, parentScreenField, (net.minecraft.client.gui.GuiMultiplayer) event.getGui());
        event.setGui(new GuiMultiplayer(parentScreen));

        PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(this.displayName, true);
        return true;
    }
    else throw new IllegalArgumentException("Invalid argument: GuiOpenEvent with GuiMainMenu or GuiMultiplayer required");
}
项目:Skills    文件:GuiManager.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
        if (event.gui instanceof GuiEnchantment && !(event.gui instanceof SK_GuiEnchantment)) 
        {
            event.gui = new SK_GuiEnchantment((GuiEnchantment) event.gui);
        }

}