MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    [1.7.10]Supprimer le bouton ressource pack du menu Options (GuiOptions)

    Planifier Épinglé Verrouillé Déplacé Sans suite
    29 Messages 7 Publieurs 5.0k Vues 1 Watching
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • robin4002R Hors-ligne
      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
      dernière édition par

      Salut,
      Visiblement la recherche ce n’est pas ton fort.
      http://www.minecraftforgefrance.fr/showthread.php?tid=2219&highlight=supprimer

      (j’ai supprimé ton message dans la section cauldron).
      (il manque la balise de version dans le titre).

      1 réponse Dernière réponse Répondre Citer 0
      • iSeaZeRI Hors-ligne
        iSeaZeR
        dernière édition par

        Bonjours,
        J’ai chercher, et je suis effectivement tomber sur se topic, mais j’ai essayer il y a des erreur quand je place les ligne de code qui ne peuve être corriger c’est pour sa que je demande un aider spécial sinon je pence que je n’aurais jamais fait se poste !

        Exemple : (se qui est en gras c’est se qui ne peu pas être corriger)

        @SubscribeEvent
                    public void onInitGuiEvent(InitGuiEvent event)
                    {
                       if (event.gui instanceof GuiOptions)
                       {
                           for(Object o : event.buttonList)
                           {
                                 if(o instanceof GuiButton && ((GuiButton)o).id == 105)
                                 {
                                        event.buttonList.remove(o);
                                 }
                           }

        Merci de votre réponse .

        1 réponse Dernière réponse Répondre Citer 0
        • robin4002R Hors-ligne
          robin4002 Moddeurs confirmés Rédacteurs Administrateurs
          dernière édition par

          ça serait bien de préciser quelles sont les erreurs que tu rencontre.

          1 réponse Dernière réponse Répondre Citer 0
          • iSeaZeRI Hors-ligne
            iSeaZeR
            dernière édition par

            Dans ma dernière réponde que j’ai mis a jours,j’ai mis se que je ne peu pas corriger !

            Merci de votre réponse.

            1 réponse Dernière réponse Répondre Citer 0
            • iSeaZeRI Hors-ligne
              iSeaZeR
              dernière édition par

              aider moi s’il vous plaît !..

              1 réponse Dernière réponse Répondre Citer 0
              • AymericRedA Hors-ligne
                AymericRed
                dernière édition par

                Eclipse dit quoi comme erreur ?

                Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

                1 réponse Dernière réponse Répondre Citer 0
                • iSeaZeRI Hors-ligne
                  iSeaZeR
                  dernière édition par

                  quand je passe ma souris dessus il me dit sa : void is an invalid type for the variable onInitGuiEvent 
                  et sa pour event : Duplicate local variable event

                  Merci de votre réponse.

                  1 réponse Dernière réponse Répondre Citer 0
                  • robin4002R Hors-ligne
                    robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                    dernière édition par

                    Envoies toutes la classe dans laquelle tu as mit ce code.

                    1 réponse Dernière réponse Répondre Citer 0
                    • DiabolicaTrixD Hors-ligne
                      DiabolicaTrix Correcteurs Moddeurs confirmés
                      dernière édition par

                      Le TickEvent pour ça:

                      
                      @SubscribeEvent
                         @SideOnly(Side.CLIENT)
                         public void onTick(TickEvent.ClientTickEvent event)
                         {
                             Minecraft mc = FMLClientHandler.instance().getClient();
                             if(mc.currentScreen != null && mc.currentScreen.getClass().equals(GuiMainMenu.class))
                             {
                                 mc.displayGuiScreen(new GuiCustomMainMenu());
                      
                             }
                         }
                      
                      

                      n’est pas conseillé. Regarde ce tutoriel: http://www.minecraftforgefrance.fr/showthread.php?tid=2386 (La partie avec l’event GuiOpenEvent)

                      Sinon, envoies ta classe complète comme a dit robin.

                      1 réponse Dernière réponse Répondre Citer 0
                      • iSeaZeRI Hors-ligne
                        iSeaZeR
                        dernière édition par

                        c’est ta dire qu’entent tu par le classe parce-que  je suis débutant donc j’ai impeux de mal a comprendre le langage de codeur ^^

                        EDIT : j’ai mis le :

                        1. @SubscribeEvent
                        2. public void onGuiOpen(GuiOpenEvent event) {
                        3. if (event.gui instanceof LeGuiVoulut) event.gui = new VotreGui();
                        4. }

                        dans Mon GuiMainMenu mais il me demande d’ajouter un argument :

                        @SubscribeEvent
                        public void onGuiOpen(GuiOpenEvent event) {
                        if (event.gui instanceof GuiOptions) event.gui = new GuiCustomOptions(null, null);
                        }

                        mais sa ne marche toujours pas … 😕

                        1 réponse Dernière réponse Répondre Citer 0
                        • iSeaZeRI Hors-ligne
                          iSeaZeR
                          dernière édition par

                          package fr.minecraftforgefrance.client.custommenu;

                          import net.minecraft.client.Minecraft;
                          import net.minecraft.client.gui.GuiButton;
                          import net.minecraft.client.gui.GuiCustomOptions;
                          import net.minecraft.client.gui.GuiMainMenu;
                          import net.minecraft.client.gui.GuiOptions;
                          import net.minecraftforge.client.event.GuiOpenEvent;
                          import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent;
                          import cpw.mods.fml.client.FMLClientHandler;
                          import cpw.mods.fml.common.FMLCommonHandler;
                          import cpw.mods.fml.common.Mod;
                          import cpw.mods.fml.common.Mod.EventHandler;
                          import cpw.mods.fml.common.event.FMLInitializationEvent;
                          import cpw.mods.fml.common.eventhandler.SubscribeEvent;
                          import cpw.mods.fml.common.gameevent.TickEvent;
                          import cpw.mods.fml.relauncher.Side;
                          import cpw.mods.fml.relauncher.SideOnly;

                          @Mod(modid = “custommenu”, name = “Custom Menu”, version = “1.1.0”)
                          public class ModCustomMenu
                          {
                          @EventHandler
                          public void init(FMLInitializationEvent event)
                          {
                          if(event.getSide().isClient())
                          {
                          FMLCommonHandler.instance().bus().register(this);
                          }
                          }

                          @SubscribeEvent
                          @SideOnly(Side.CLIENT)
                          public void onTick(TickEvent.ClientTickEvent event)
                          {
                          Minecraft mc = FMLClientHandler.instance().getClient();
                          if(mc.currentScreen != null && mc.currentScreen.getClass().equals(GuiMainMenu.class))
                          {
                          mc.displayGuiScreen(new GuiCustomMainMenu());

                          }
                          }

                          @SubscribeEvent
                          public void onGuiOpen(GuiOpenEvent event) {
                          if (event.gui instanceof GuiOptions) event.gui = new GuiCustomOptions(null, null);
                          }

                          }

                          je croix que sais sa que vous voulez non (class) ?

                          1 réponse Dernière réponse Répondre Citer 0
                          • DiabolicaTrixD Hors-ligne
                            DiabolicaTrix Correcteurs Moddeurs confirmés
                            dernière édition par

                            Envoies ta classe GuiCustomOption, si c’est bien là qu’eclipse te demande de rajouter des arguments.

                            1 réponse Dernière réponse Répondre Citer 0
                            • iSeaZeRI Hors-ligne
                              iSeaZeR
                              dernière édition par

                              package net.minecraft.client.gui;
                              
                              import cpw.mods.fml.relauncher.Side;
                              import cpw.mods.fml.relauncher.SideOnly;
                              import net.minecraft.client.audio.PositionedSoundRecord;
                              import net.minecraft.client.audio.SoundCategory;
                              import net.minecraft.client.audio.SoundEventAccessorComposite;
                              import net.minecraft.client.audio.SoundHandler;
                              import net.minecraft.client.gui.stream.GuiStreamOptions;
                              import net.minecraft.client.gui.stream.GuiStreamUnavailable;
                              import net.minecraft.client.resources.I18n;
                              import net.minecraft.client.settings.GameSettings;
                              import net.minecraft.client.stream.IStream;
                              
                              @SideOnly(Side.CLIENT)
                              public class GuiCustomOptions extends GuiScreen implements GuiYesNoCallback
                              {
                                  private static final GameSettings.Options[] field_146440_f = new GameSettings.Options[] {GameSettings.Options.FOV, GameSettings.Options.DIFFICULTY};
                                  private final GuiScreen field_146441_g;
                                  private final GameSettings field_146443_h;
                                  protected String field_146442_a = "Options";
                                  private static final String __OBFID = "CL_00000700";
                              
                                  public GuiCustomOptions(GuiScreen p_i1046_1_, GameSettings p_i1046_2_)
                                  {
                                      this.field_146441_g = p_i1046_1_;
                                      this.field_146443_h = p_i1046_2_;
                                  }
                              
                                  /**
                                   * Adds the buttons (and other controls) to the screen in question.
                                   */
                                  public void initGui()
                                  {
                                      int i = 0;
                                      this.field_146442_a = I18n.format("options.title", new Object[0]);
                                      GameSettings.Options[] aoptions = field_146440_f;
                                      int j = aoptions.length;
                              
                                      for (int k = 0; k < j; ++k)
                                      {
                                          GameSettings.Options options = aoptions[k];
                              
                                          if (options.getEnumFloat())
                                          {
                                              this.buttonList.add(new GuiOptionSlider(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), options));
                                          }
                                          else
                                          {
                                              GuiOptionButton guioptionbutton = new GuiOptionButton(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), options, this.field_146443_h.getKeyBinding(options));
                              
                                              if (options == GameSettings.Options.DIFFICULTY && this.mc.theWorld != null && this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
                                              {
                                                  guioptionbutton.enabled = false;
                                                  guioptionbutton.displayString = I18n.format("options.difficulty", new Object[0]) + ": " + I18n.format("options.difficulty.hardcore", new Object[0]);
                                              }
                              
                                              this.buttonList.add(guioptionbutton);
                                          }
                              
                                          ++i;
                                      }
                              
                                      this.buttonList.add(new GuiButton(8675309, this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20, "Super Secret Settings…")
                                      {
                                          private static final String __OBFID = "CL_00000701";
                                          public void func_146113_a(SoundHandler p_146113_1_)
                                          {
                                              SoundEventAccessorComposite soundeventaccessorcomposite = p_146113_1_.getRandomSoundFromCategories(new SoundCategory[] {SoundCategory.ANIMALS, SoundCategory.BLOCKS, SoundCategory.MOBS, SoundCategory.PLAYERS, SoundCategory.WEATHER});
                              
                                              if (soundeventaccessorcomposite != null)
                                              {
                                                  p_146113_1_.playSound(PositionedSoundRecord.func_147674_a(soundeventaccessorcomposite.getSoundEventLocation(), 0.5F));
                                              }
                                          }
                                      });
                                      this.buttonList.add(new GuiButton(106, this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.sounds", new Object[0])));
                                      this.buttonList.add(new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.stream", new Object[0])));
                                      this.buttonList.add(new GuiButton(101, this.width / 2 - 155, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.video", new Object[0])));
                                      this.buttonList.add(new GuiButton(100, this.width / 2 + 5, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.controls", new Object[0])));
                                      this.buttonList.add(new GuiButton(102, this.width / 2 - 155, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.language", new Object[0])));
                                      this.buttonList.add(new GuiButton(103, this.width / 2 + 5, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.multiplayer.title", new Object[0])));
                                      this.buttonList.add(new GuiButton(105, this.width / 2 - 155, this.height / 6 + 144 - 6, 150, 20, I18n.format("LeBoutonASuprimerRessourcePack", new Object[0])));
                                      this.buttonList.add(new GuiButton(104, this.width / 2 + 5, this.height / 6 + 144 - 6, 150, 20, I18n.format("options.snooper.view", new Object[0])));
                                      this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
                                  }
                              
                                  protected void actionPerformed(GuiButton p_146284_1_)
                                  {
                                      if (p_146284_1_.enabled)
                                      {
                                          if (p_146284_1_.id < 100 && p_146284_1_ instanceof GuiOptionButton)
                                          {
                                              this.field_146443_h.setOptionValue(((GuiOptionButton)p_146284_1_).returnEnumOptions(), 1);
                                              p_146284_1_.displayString = this.field_146443_h.getKeyBinding(GameSettings.Options.getEnumOptions(p_146284_1_.id));
                                          }
                              
                                          if (p_146284_1_.id == 8675309)
                                          {
                                              this.mc.entityRenderer.activateNextShader();
                                          }
                              
                                          if (p_146284_1_.id == 101)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiVideoSettings(this, this.field_146443_h));
                                          }
                              
                                          if (p_146284_1_.id == 100)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiControls(this, this.field_146443_h));
                                          }
                              
                                          if (p_146284_1_.id == 102)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiLanguage(this, this.field_146443_h, this.mc.getLanguageManager()));
                                          }
                              
                                          if (p_146284_1_.id == 103)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new ScreenChatOptions(this, this.field_146443_h));
                                          }
                              
                                          if (p_146284_1_.id == 104)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiSnooper(this, this.field_146443_h));
                                          }
                              
                                          if (p_146284_1_.id == 200)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(this.field_146441_g);
                                          }
                              
                                          if (p_146284_1_.id == 105)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiScreenResourcePacks(this));
                                          }
                              
                                          if (p_146284_1_.id == 106)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              this.mc.displayGuiScreen(new GuiScreenOptionsSounds(this, this.field_146443_h));
                                          }
                              
                                          if (p_146284_1_.id == 107)
                                          {
                                              this.mc.gameSettings.saveOptions();
                                              IStream istream = this.mc.func_152346_Z();
                              
                                              if (istream.func_152936_l() && istream.func_152928_D())
                                              {
                                                  this.mc.displayGuiScreen(new GuiStreamOptions(this, this.field_146443_h));
                                              }
                                              else
                                              {
                                                  GuiStreamUnavailable.func_152321_a(this);
                                              }
                                          }
                                      }
                                  }
                              
                                  /**
                                   * Draws the screen and all the components in it.
                                   */
                                  public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
                                  {
                                      this.drawDefaultBackground();
                                      this.drawCenteredString(this.fontRendererObj, this.field_146442_a, this.width / 2, 15, 16777215);
                                      super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
                                  }
                              }
                              
                              1 réponse Dernière réponse Répondre Citer 0
                              • DeletedD Hors-ligne
                                Deleted
                                dernière édition par

                                new GuiCustomOptions(null, null); ––>>
                                new GuiCustomOptions(Minecraft.getMinecraft().currentScreen, Minecraft.getMinecraft().gameSettings /** ou un truc dans me genre */);

                                1 réponse Dernière réponse Répondre Citer 0
                                • iSeaZeRI Hors-ligne
                                  iSeaZeR
                                  dernière édition par

                                  J’ai mis c’ete ligne de code ––>

                                  [font=Ubuntu, sans-serifnew GuiCustomOptions(Minecraft.getMinecraft().currentScreen, Minecraft.getMinecraft().gameSettings /** ou un truc dans me genre */);]

                                  [font=Ubuntu, sans-serifque tu ma proposer mais le bouton ressource pas est toujours la … :/]

                                  1 réponse Dernière réponse Répondre Citer 0
                                  • AymericRedA Hors-ligne
                                    AymericRed
                                    dernière édition par

                                    GuiOpenEvent n’est pas un event fml mais un event forge, normal que ça marche pas, enregistre ton event avec forge 🙂

                                    Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                    AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                    Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                    Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

                                    1 réponse Dernière réponse Répondre Citer 0
                                    • iSeaZeRI Hors-ligne
                                      iSeaZeR
                                      dernière édition par

                                      ha ok d’accords merci mais , comment je fait pour le maître en fml … 😕

                                      1 réponse Dernière réponse Répondre Citer 0
                                      • SCAREXS Hors-ligne
                                        SCAREX
                                        dernière édition par

                                        FMLCommonHandler.instance().bus().register(tonObjet)

                                        PS : “mettre”, je sais je suis chiant.

                                        Site web contenant mes scripts : http://SCAREXgaming.github.io

                                        Pas de demandes de support par MP ni par skype SVP.
                                        Je n'accepte sur skype que l…

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • iSeaZeRI Hors-ligne
                                          iSeaZeR
                                          dernière édition par

                                          se que tu vien de me de me donner ne m’aide pas beaucoup , Ou le placer ? 
                                          si j’ai donner ma classe c’est pour que vous me donniez un exemple !

                                          ([font=Ubuntu, sans-serifPS : “mettre”, je sais je suis chiant.)]
                                          PS : dsl de réclamer de l’aide sur un “FORUM” ou devrais se trouver un communautés qui soutienne les autres qui les aider , mais bon je voie que la communautés et très critique sur se forum …

                                          1 réponse Dernière réponse Répondre Citer 0
                                          • SCAREXS Hors-ligne
                                            SCAREX
                                            dernière édition par

                                            Tu dois le mettre à la place de l’enregistrement avec forge.

                                            Si je le dis dans un PS, c’est juste que j’aime bien l’orthographe. En revanche je ne pense pas que tu puisses dire que la communauté n’est pas là pour t’aider, les seules choses qui nous énerve sur le forum c’est le fait que les membres ne cherchent pas un minimum comme marqué dans les règles de la section. J’ai relu les postes précédents pour voir le problème en entier, d’après ce que j’ai vu, tu as eu plusieurs liens proposés avec dans chacun la réponse à ton problème.

                                            Site web contenant mes scripts : http://SCAREXgaming.github.io

                                            Pas de demandes de support par MP ni par skype SVP.
                                            Je n'accepte sur skype que l…

                                            1 réponse Dernière réponse Répondre Citer 0
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • Premier message
                                              Dernier message
                                            Design by Woryk
                                            ContactMentions Légales

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB