MFF

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

    Menu principal animé 1.8.1 -> 1.7.10

    Planifier Épinglé Verrouillé Déplacé Sans suite
    1.7.10
    31 Messages 4 Publieurs 5.8k 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.
    • DeletedD Hors-ligne
      Deleted
      dernière édition par

      ModelPlayer n’existe pas, c’est ModelBiped, J’avais déjà regardé avant x)

      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

        Ah oui, tu es en 1.7.10 x)
        J’ai trop l’habitude de la 1.8.

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

          Ouais faudrait peut-être que je me mette à la 1.8 1 de ces 4 quand même x)
          Ok alors le bug du model venait du resource pack. Donc pour le model c’est bon
          Ensuite que dois-je faire ? Reprendre mon système et virer la condition de si le monde est null, on charge une map, nan ?

          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

            Non, il faut charger le skin du joueur.

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

              Bah ça à la limite, je pourrai le faire plus tard c’est pas la priorité

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

                Petit up avec cette fois beaucoup plus d’info car je pense que tout le monde n’a pas forcément compris ce que je désirais x)
                Ce que je veux comme menu c’est ça.

                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

                  Ah oui … Ce n’est pas du tout ce que titre demande …
                  Tu aurai dû directement demander comment rendre un monde dans le menu principal. Et ça je ne sais pas faire.

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

                    Oui ce n’était pas très explicite, mais même avec le code de la béta, tu ne vois pas comment faire, ou quelqu’un d’autre ? Je veux dire c’est pas ce qu’il y’a de plus compliqué, nan ? ^^’

                    PS = dans mon premier message, j’avais dit comment charger un mode, c’est un peu pareil 🙂

                    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

                      Oui c’est moi aussi qui a mal compris, j’ai lu la discussion trop vite.

                      Il faudrait que je fasse des tests de mon côté.

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

                        je tâcherais de faire des test de mon côté, je ne te promet rien par contre 😉

                        Si je t'ai filé un coup de main n'oublie pas le + / -
                        Par contre évite les demandes d'aides en MP, tu sera sympa'

                        La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                        Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

                        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

                          Je viens de relire le post et du-coup je viens de réaliser à quel point j’étais hors sujet x)
                          Je suis en train de faire des tests de mon côté, j’éditerai ce message en fonction des résultats.

                          EDIT : impossible de trouver un équivalent pour autosavePeriod.
                          Et je me mange un NPE lorsque je lances le jeu :

                          [22:56:43] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
                          // Ouch. That hurt :(
                          
                          Time: 02/10/15 22:56
                          Description: Initializing game
                          
                          java.lang.NullPointerException: Initializing game
                              at net.minecraft.client.Minecraft.launchIntegratedServer(Minecraft.java:2198)
                              at fr.minecraftforgefrance.test.CustomMainMenu.initGui(CustomMainMenu.java:150)
                              at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294)
                              at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
                              at fr.minecraftforgefrance.test.TestMod.onGuiInit(TestMod.java:26)
                              at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_TestMod_onGuiInit_Post.invoke(.dynamic)
                              at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
                              at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
                              at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296)
                              at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
                              at net.minecraft.client.Minecraft.startGame(Minecraft.java:607)
                              at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                              at net.minecraft.client.main.Main.main(Main.java:164)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                              at java.lang.reflect.Method.invoke(Unknown Source)
                              at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                              at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                              at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                              at GradleStart.main(Unknown Source)
                          
                          A detailed walkthrough of the error, its code path and all known details is as follows:
                          ---------------------------------------------------------------------------------------
                          
                          -- Head --
                          Stacktrace:
                              at net.minecraft.client.Minecraft.launchIntegratedServer(Minecraft.java:2198)
                              at fr.minecraftforgefrance.test.CustomMainMenu.initGui(CustomMainMenu.java:150)
                              at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294)
                              at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
                              at fr.minecraftforgefrance.test.TestMod.onGuiInit(TestMod.java:26)
                              at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_TestMod_onGuiInit_Post.invoke(.dynamic)
                              at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
                              at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
                              at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296)
                              at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
                              at net.minecraft.client.Minecraft.startGame(Minecraft.java:607)
                          
                          -- Initialization --
                          Details:
                          Stacktrace:
                              at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                              at net.minecraft.client.main.Main.main(Main.java:164)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                              at java.lang.reflect.Method.invoke(Unknown Source)
                              at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                              at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                              at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                              at GradleStart.main(Unknown Source)
                          
                          -- System Details --
                          Details:
                              Minecraft Version: 1.7.10
                              Operating System: Windows 10 (amd64) version 10.0
                              Java Version: 1.8.0_60, Oracle Corporation
                              Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                              Memory: 937671696 bytes (894 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
                              JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                              AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                              IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                              FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1492 5 mods loaded, 5 mods active
                              States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                              UCHIJA    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
                              UCHIJA    FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar)
                              UCHIJA    Forge{10.13.4.1492} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar)
                              UCHIJA    test{0.0.0} [Test] (bin)
                              UCHIJA    modtutoriel{1.0.0} [Mod Tutoriel] (bin)
                              GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 9600 GT/PCIe/SSE2'
                              Launched Version: 1.7.10
                              LWJGL: 2.9.1
                              OpenGL: GeForce 9600 GT/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation
                              GL Caps: Using GL 1.3 multitexturing.
                          Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
                          Anisotropic filtering is supported and maximum anisotropy is 16.
                          Shaders are available because OpenGL 2.1 is supported.
                          
                              Is Modded: Definitely; Client brand changed to 'fml,forge'
                              Type: Client (map_client.txt)
                              Resource Packs: []
                              Current Language: English (US)
                              Profiler Position: N/A (disabled)
                              Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                              Anisotropic Filtering: Off (1)
                          [22:56:43] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\robin\Documents\Modding\forge-1.7.10\eclipse\.\crash-reports\crash-2015-10-02_22.56.43-client.txt
                          AL lib: (EE) alc_cleanup: 1 device not closed
                          

                          Tu as la même chose de ton côté ?

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

                            Enfait ce menu là c’est un peu une usine a gaz, car il fait juste que lancer un serveur(une save quoi) qui il bloque le joueur et fait tourner sa caméra, pour affichier ensuite des boutons du menu principal, ce qui est un moyen de facilité je trouve, le mieux serait de faire un rendu 3D de blocs un peu comme mon tuto sur les menu 3D (a adapter donc pour les blocs) tu aura un résultat tellement plus propre…

                            Un peu comme le défunt Evil-Minecraft

                            A toi de jouer ! 🙂

                            Si je t'ai filé un coup de main n'oublie pas le + / -
                            Par contre évite les demandes d'aides en MP, tu sera sympa'

                            La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                            Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

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

                              Peut être ZeAma, mais je souhaite vraiment avoir l équivalent.  Déjà au niveau de la vue du joueur qui change et permet d avoir une vue globale des alentours mais aussi au niveau d une vue continuelle. Ta solution de rendu n est pas animé ? C est juste un rendu fixe, moi je veux que sa soit animé :3
                              Et si tu dis que mon code est une solution de facilité,  pourquoi ne pas s en contenter alors ^^ ?
                              robin je vois ça tout  l’heure 🙂

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

                                Bah oui tu peux utiliser cette solution ,j’t’empêche pas de faire ce que tu veux, mais après lancer un serveur juste pour un menu c’est pas top 😕 Fait comme tu veux.

                                Si je t'ai filé un coup de main n'oublie pas le + / -
                                Par contre évite les demandes d'aides en MP, tu sera sympa'

                                La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                                Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

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

                                  Ok, je recommence le code de A à Z et de manière beaucoup plus propre, cette après-midi. Je vous tiens au courant 🙂

                                  EDIT = Alors je suis en train de réimporter toutes les méthodes de chargement de monde, etc…Qui datent de la 1.8.1 car le système actuel ne marche pas (voir le NPE de robin). Du coup voici à quoi ressemble ma classe pour le moment avec quelque méthode réimportées de la béta. Je suis en train de tout corriger, je galère vraiment --’

                                  
                                  @SideOnly(Side.CLIENT)
                                  public class CustomMainMenu extends GuiScreen implements GuiYesNoCallback
                                  {
                                      private int panoramaTimer;
                                      private DynamicTexture viewportTexture;
                                      private static final ResourceLocation[] titlePanoramaPaths = new ResourceLocation[] {new ResourceLocation("textures/gui/title/background/panorama_0.png"), new ResourceLocation("textures/gui/title/background/panorama_1.png"), new ResourceLocation("textures/gui/title/background/panorama_2.png"), new ResourceLocation("textures/gui/title/background/panorama_3.png"), new ResourceLocation("textures/gui/title/background/panorama_4.png"), new ResourceLocation("textures/gui/title/background/panorama_5.png")};
                                      private ResourceLocation field_110351_G;
                                  
                                      private short musicCounter = 0;
                                      private byte isFirstTime = 0;
                                      public static boolean mmactive = false;
                                      private List saveList;
                                      private int selectedWorld;
                                  
                                      public void updateScreen()
                                      {
                                          super.updateScreen();
                                      }
                                  
                                      /**
                                       * Returns true if this GUI should pause the game when it is displayed in single-player
                                       */
                                      public boolean doesGuiPauseGame()
                                      {
                                          return false;
                                      }
                                  
                                      public void initGui()
                                      {
                                      this.isFirstTime+=1;
                                      if(isFirstTime == 1)
                                      {
                                      Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147673_a(new ResourceLocation(DyingCraftMod.MODID + ":mainMenuTheme")));
                                      }
                                          this.viewportTexture = new DynamicTexture(256, 256);
                                          this.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation("background", this.viewportTexture);
                                          boolean flag = true;
                                          int i = this.height / 4 + 48;
                                          this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, I18n.format("menu.options", new Object[0])));
                                          this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, I18n.format("menu.quit", new Object[0])));
                                          this.buttonList.add(new GuiButton(1, this.width / 2 - 100, i, I18n.format("menu.singleplayer", new Object[0])));
                                  
                                          mmactive = true;
                                  //        if(musicId == -1 && !loadingWorld)
                                  //        {
                                  //            mc.sndManager.playSoundFX("lotr.music.menu", 0.1F, 1.0F);
                                  //            try
                                  //            {
                                  //                musicId = Integer.valueOf(((Integer)ModLoader.getPrivateValue(net.minecraft.src.SoundManager.class, mc.sndManager, "e")).intValue()).intValue();
                                  //                ModLoader.setPrivateValue(net.minecraft.src.SoundManager.class, mc.sndManager, "i", Integer.valueOf(0x3b9ac9ff));
                                  //            }
                                  //            catch(Exception exception)
                                  //            {
                                  //                if(exception instanceof NoSuchFieldException)
                                  //                {
                                  //                    try
                                  //                    {
                                  //                        musicId = Integer.valueOf(((Integer)ModLoader.getPrivateValue(net.minecraft.src.SoundManager.class, mc.sndManager, "latestSoundID")).intValue()).intValue();
                                  //                        ModLoader.setPrivateValue(net.minecraft.src.SoundManager.class, mc.sndManager, "ticksBeforeMusic", Integer.valueOf(0x3b9ac9ff));
                                  //                    }
                                  //                    catch(Exception exception1)
                                  //                    {
                                  //                        exception1.printStackTrace();
                                  //                    }
                                  //                } else
                                  //                {
                                  //                    exception.printStackTrace();
                                  //                }
                                  //            }
                                  //        }
                                          Minecraft.getMinecraft().gameSettings.hideGUI = true;
                                          Minecraft.getMinecraft().gameSettings.thirdPersonView = 1;
                                          //mc.playerController = new PlayerControllerSP(mc);
                                          if(mc.theWorld == null)
                                          {
                                              loadSaves();
                                              String s = getSaveFileName(0);
                                              String s1 = getSaveName(0);
                                              if(s1 == null || s == null)
                                              {
                                                  System.out.println("la map est nulle, il faut en créer une automatiquement");
                                              } 
                                              else
                                              {
                                              final long demoWorldSeed = (long)"North Carolina".hashCode();
                                                  final WorldSettings demoWorldSettings = (new WorldSettings(demoWorldSeed, WorldSettings.GameType.SURVIVAL, true, false, WorldType.DEFAULT));
                                                  this.startWorld(s, s1, new WorldSettings(0L, 0, false));
                                                  //this.mc.launchIntegratedServer(s, s1, demoWorldSettings);
                                                  //mc.theWorld.autosavePeriod = 0x3b9ac9ff;
                                              }
                                          }
                                      }
                                  
                                      public void startWorld(String s, String s1, WorldSettings worldsettings)
                                      {
                                          changeWorld1(null);
                                          System.gc();
                                          if(mc.getSaveLoader().isOldMapFormat(s))
                                          {
                                              this.convertMapFormat(s, s1);
                                          } else
                                          {
                                              if(mc.loadingScreen != null)
                                              {
                                                  mc.loadingScreen.resetProgressAndMessage("Switching level");
                                                  mc.loadingScreen.func_73722_d("");
                                              }
                                              ISaveHandler isavehandler = mc.getSaveLoader().getSaveLoader(s, false);
                                              World world = null;
                                              //world = new World(isavehandler, s1, worldsettings);
                                              if(world.getWorldInfo() == null)
                                              {
                                  //                mc.thePlayer.getStatFileWriter().readStat(StatList.createWorldStat, 1);
                                  //                mc.thePlayer.getStatFileWriter().readStat(StatList.startGameStat, 1);
                                                  changeWorld2(world, "Generating level");
                                              } 
                                              else
                                              {
                                  //             mc.thePlayer.getStatFileWriter().readStat(StatList.loadWorldStat, 1);
                                  //             mc.thePlayer.getStatFileWriter().readStat(StatList.startGameStat, 1);
                                                  changeWorld2(world, "Loading level");
                                              }
                                          }
                                      }
                                  
                                      private void convertMapFormat(String s, String s1)
                                      {
                                          mc.loadingScreen.resetProgressAndMessage((new StringBuilder()).append("Converting World to ").append(mc.getSaveLoader().func_154333_a()).toString());
                                          mc.loadingScreen.func_73722_d("This may take a while :)");
                                          mc.getSaveLoader().convertMapFormat(s, mc.loadingScreen);
                                          startWorld(s, s1, new WorldSettings(0L, 0, true));
                                      }
                                  
                                      public void changeWorld1(World world)
                                      {
                                          changeWorld2(world, "");
                                      }
                                  
                                      public void changeWorld2(World world, String s)
                                      {
                                          changeWorld(world, s, null);
                                      }
                                  
                                      public void changeWorld(World world, String s, EntityPlayer entityplayer)
                                      {
                                          statFileWriter.func_27175_b();
                                          statFileWriter.syncStats();
                                          renderViewEntity = null;
                                          if(loadingScreen != null)
                                          {
                                              loadingScreen.printText(s);
                                              loadingScreen.displayLoadingString("");
                                          }
                                          sndManager.playStreaming(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
                                          if(theWorld != null)
                                          {
                                              theWorld.saveWorldIndirectly(loadingScreen);
                                          }
                                          theWorld = world;
                                          if(world != null)
                                          {
                                              if(playerController != null)
                                              {
                                                  playerController.func_717_a(world);
                                              }
                                              if(!isMultiplayerWorld())
                                              {
                                                  if(entityplayer == null)
                                                  {
                                                      thePlayer = (EntityPlayerSP)world.func_4085_a(net.minecraft.src.EntityPlayerSP.class);
                                                  }
                                              } else
                                              if(thePlayer != null)
                                              {
                                                  thePlayer.preparePlayerToSpawn();
                                                  if(world != null)
                                                  {
                                                      world.entityJoinedWorld(thePlayer);
                                                  }
                                              }
                                              if(!world.multiplayerWorld)
                                              {
                                                  preloadWorld(s);
                                              }
                                              if(thePlayer == null)
                                              {
                                                  thePlayer = (EntityPlayerSP)playerController.createPlayer(world);
                                                  thePlayer.preparePlayerToSpawn();
                                                  playerController.flipPlayer(thePlayer);
                                              }
                                              thePlayer.movementInput = new MovementInputFromOptions(gameSettings);
                                              if(renderGlobal != null)
                                              {
                                                  renderGlobal.changeWorld(world);
                                              }
                                              if(effectRenderer != null)
                                              {
                                                  effectRenderer.clearEffects(world);
                                              }
                                              playerController.func_6473_b(thePlayer);
                                              if(entityplayer != null)
                                              {
                                                  world.emptyMethod1();
                                              }
                                              net.minecraft.src.IChunkProvider ichunkprovider = world.getIChunkProvider();
                                              if(ichunkprovider instanceof ChunkProviderLoadOrGenerate)
                                              {
                                                  ChunkProviderLoadOrGenerate chunkproviderloadorgenerate = (ChunkProviderLoadOrGenerate)ichunkprovider;
                                                  int i = MathHelper.floor_float((int)thePlayer.posX) >> 4;
                                                  int j = MathHelper.floor_float((int)thePlayer.posZ) >> 4;
                                                  chunkproviderloadorgenerate.setCurrentChunkOver(i, j);
                                              }
                                              world.spawnPlayerWithLoadedChunks(thePlayer);
                                              if(world.isNewWorld)
                                              {
                                                  world.saveWorldIndirectly(loadingScreen);
                                              }
                                              renderViewEntity = thePlayer;
                                          } else
                                          {
                                              thePlayer = null;
                                          }
                                          System.gc();
                                          systemTime = 0L;
                                      }
                                  
                                      protected String getSaveName(int i)
                                      {
                                          if(saveList.size() < i + 1)
                                          {
                                              return null;
                                          }
                                          String s = ((SaveFormatComparator)saveList.get(i)).getDisplayName();
                                          if(s == null || MathHelper.stringNullOrLengthZero(s))
                                          {
                                              s = (new StringBuilder()).append(I18n.format("selectWorld.world")).append(" ").append(i + 1).toString();
                                          }
                                          return s;
                                      }
                                  
                                      private void loadSaves()
                                      {
                                          ISaveFormat isaveformat = mc.getSaveLoader();
                                          try 
                                          {
                                  saveList = isaveformat.getSaveList();
                                  } 
                                          catch (AnvilConverterException e) 
                                          {
                                  e.printStackTrace();
                                  }
                                          Collections.sort(saveList);
                                          selectedWorld = -1;
                                      }
                                  
                                      protected String getSaveFileName(int i)
                                      {
                                          if(saveList.size() < i + 1)
                                          {
                                              return null;
                                          } else
                                          {
                                              return ((SaveFormatComparator)saveList.get(i)).getFileName();
                                          }
                                      }
                                  
                                      protected void actionPerformed(GuiButton p_146284_1_)
                                      {
                                          if (p_146284_1_.id == 0)
                                          {
                                              this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
                                          }
                                  
                                          if (p_146284_1_.id == 1)
                                          {
                                              this.mc.displayGuiScreen(new GuiSelectWorld(this));
                                          }
                                  
                                          if (p_146284_1_.id == 4)
                                          {
                                              this.mc.shutdown();
                                          }
                                  
                                          if (p_146284_1_.id == 12)
                                          {
                                              ISaveFormat isaveformat = this.mc.getSaveLoader();
                                              WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
                                  
                                              if (worldinfo != null)
                                              {
                                                  GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
                                                  this.mc.displayGuiScreen(guiyesno);
                                              }
                                          }
                                      }
                                  
                                      private void drawPanorama(int p_73970_1_, int p_73970_2_, float p_73970_3_)
                                      {
                                          Tessellator tessellator = Tessellator.instance;
                                          GL11.glMatrixMode(GL11.GL_PROJECTION);
                                          GL11.glPushMatrix();
                                          GL11.glLoadIdentity();
                                          Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
                                          GL11.glMatrixMode(GL11.GL_MODELVIEW);
                                          GL11.glPushMatrix();
                                          GL11.glLoadIdentity();
                                          GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                                          GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
                                          GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
                                          GL11.glEnable(GL11.GL_BLEND);
                                          GL11.glDisable(GL11.GL_ALPHA_TEST);
                                          GL11.glDisable(GL11.GL_CULL_FACE);
                                          GL11.glDepthMask(false);
                                          OpenGlHelper.glBlendFunc(770, 771, 1, 0);
                                          byte b0 = 8;
                                  
                                          for (int k = 0; k < b0 * b0; ++k)
                                          {
                                              GL11.glPushMatrix();
                                              float f1 = ((float)(k % b0) / (float)b0 - 0.5F) / 64.0F;
                                              float f2 = ((float)(k / b0) / (float)b0 - 0.5F) / 64.0F;
                                              float f3 = 0.0F;
                                              GL11.glTranslatef(f1, f2, f3);
                                              GL11.glRotatef(MathHelper.sin(((float)this.panoramaTimer + p_73970_3_) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
                                              GL11.glRotatef(-((float)this.panoramaTimer + p_73970_3_) * 0.1F, 0.0F, 1.0F, 0.0F);
                                  
                                              for (int l = 0; l < 6; ++l)
                                              {
                                                  GL11.glPushMatrix();
                                  
                                                  if (l == 1)
                                                  {
                                                      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
                                                  }
                                  
                                                  if (l == 2)
                                                  {
                                                      GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
                                                  }
                                  
                                                  if (l == 3)
                                                  {
                                                      GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
                                                  }
                                  
                                                  if (l == 4)
                                                  {
                                                      GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
                                                  }
                                  
                                                  if (l == 5)
                                                  {
                                                      GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
                                                  }
                                  
                                                  this.mc.getTextureManager().bindTexture(titlePanoramaPaths[l]);
                                                  tessellator.startDrawingQuads();
                                                  tessellator.setColorRGBA_I(16777215, 255 / (k + 1));
                                                  float f4 = 0.0F;
                                                  tessellator.addVertexWithUV(-1.0D, -1.0D, 1.0D, (double)(0.0F + f4), (double)(0.0F + f4));
                                                  tessellator.addVertexWithUV(1.0D, -1.0D, 1.0D, (double)(1.0F - f4), (double)(0.0F + f4));
                                                  tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, (double)(1.0F - f4), (double)(1.0F - f4));
                                                  tessellator.addVertexWithUV(-1.0D, 1.0D, 1.0D, (double)(0.0F + f4), (double)(1.0F - f4));
                                                  tessellator.draw();
                                                  GL11.glPopMatrix();
                                              }
                                  
                                              GL11.glPopMatrix();
                                              GL11.glColorMask(true, true, true, false);
                                          }
                                  
                                          tessellator.setTranslation(0.0D, 0.0D, 0.0D);
                                          GL11.glColorMask(true, true, true, true);
                                          GL11.glMatrixMode(GL11.GL_PROJECTION);
                                          GL11.glPopMatrix();
                                          GL11.glMatrixMode(GL11.GL_MODELVIEW);
                                          GL11.glPopMatrix();
                                          GL11.glDepthMask(true);
                                          GL11.glEnable(GL11.GL_CULL_FACE);
                                          GL11.glEnable(GL11.GL_DEPTH_TEST);
                                      }
                                  
                                      private void rotateAndBlurSkybox(float p_73968_1_)
                                      {
                                          this.mc.getTextureManager().bindTexture(this.field_110351_G);
                                          GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
                                          GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
                                          GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
                                          GL11.glEnable(GL11.GL_BLEND);
                                          OpenGlHelper.glBlendFunc(770, 771, 1, 0);
                                          GL11.glColorMask(true, true, true, false);
                                          Tessellator tessellator = Tessellator.instance;
                                          tessellator.startDrawingQuads();
                                          GL11.glDisable(GL11.GL_ALPHA_TEST);
                                          byte b0 = 3;
                                  
                                          for (int i = 0; i < b0; ++i)
                                          {
                                              tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (float)(i + 1));
                                              int j = this.width;
                                              int k = this.height;
                                              float f1 = (float)(i - b0 / 2) / 256.0F;
                                              tessellator.addVertexWithUV((double)j, (double)k, (double)this.zLevel, (double)(0.0F + f1), 1.0D);
                                              tessellator.addVertexWithUV((double)j, 0.0D, (double)this.zLevel, (double)(1.0F + f1), 1.0D);
                                              tessellator.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(1.0F + f1), 0.0D);
                                              tessellator.addVertexWithUV(0.0D, (double)k, (double)this.zLevel, (double)(0.0F + f1), 0.0D);
                                          }
                                  
                                          tessellator.draw();
                                          GL11.glEnable(GL11.GL_ALPHA_TEST);
                                          GL11.glColorMask(true, true, true, true);
                                      }
                                  
                                      /**
                                       * Renders the skybox in the main menu
                                       */
                                      private void renderSkybox(int p_73971_1_, int p_73971_2_, float p_73971_3_)
                                      {
                                          this.mc.getFramebuffer().unbindFramebuffer();
                                          GL11.glViewport(0, 0, 256, 256);
                                          this.drawPanorama(p_73971_1_, p_73971_2_, p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.rotateAndBlurSkybox(p_73971_3_);
                                          this.mc.getFramebuffer().bindFramebuffer(true);
                                          GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
                                          Tessellator tessellator = Tessellator.instance;
                                          tessellator.startDrawingQuads();
                                          float f1 = this.width > this.height ? 120.0F / (float)this.width : 120.0F / (float)this.height;
                                          float f2 = (float)this.height * f1 / 256.0F;
                                          float f3 = (float)this.width * f1 / 256.0F;
                                          tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
                                          int k = this.width;
                                          int l = this.height;
                                          tessellator.addVertexWithUV(0.0D, (double)l, (double)this.zLevel, (double)(0.5F - f2), (double)(0.5F + f3));
                                          tessellator.addVertexWithUV((double)k, (double)l, (double)this.zLevel, (double)(0.5F - f2), (double)(0.5F - f3));
                                          tessellator.addVertexWithUV((double)k, 0.0D, (double)this.zLevel, (double)(0.5F + f2), (double)(0.5F - f3));
                                          tessellator.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(0.5F + f2), (double)(0.5F + f3));
                                          tessellator.draw();
                                      }
                                  
                                      /**
                                       * 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.musicCounter++;
                                      if(musicCounter >= 1280)
                                      {
                                      musicCounter = 0;
                                      }
                                      if(musicCounter == 0)
                                      {
                                      Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147673_a(new ResourceLocation(DyingCraftMod.MODID + ":mainMenuTheme")));
                                      }
                                          GL11.glDisable(GL11.GL_ALPHA_TEST);
                                          this.renderSkybox(p_73863_1_, p_73863_2_, p_73863_3_);
                                          GL11.glEnable(GL11.GL_ALPHA_TEST);
                                          Tessellator tessellator = Tessellator.instance;
                                          short short1 = 274;
                                          int k = this.width / 2 - short1 / 2;
                                          byte b0 = 30;
                                          tessellator.setColorOpaque_I(-1);
                                          super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
                                      }
                                  }
                                  
                                  

                                  Si quelqu’un a une meilleure idée, je prends direct car je dois avouer que c’est vraiment chiant de corriger toutes ces erreurs sans savoir pour autant si ça marchera ><

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

                                    UP ! Je prends toujours si quelqu’un a une solution ou pas pour load un monde. Lisez bien mon message #23 et indiquer moi si c’est une bonne idée ou si il faut tout de suite abandonner x)

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

                                      C’est quoi le problème actuellement ?

                                      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
                                      • DeletedD Hors-ligne
                                        Deleted
                                        dernière édition par

                                        J’ai repris les méthodes de la 1.8.1 qui étaient utilisés dans le code de l’ancien gui. Je fais comme ceci car je n’arrive pas à retrouver un équivalent fonctionnel des méthodes sur de la 1.7.10. En gros je dois charger un monde de la 1.7.10 facielement, sans prise de tête si possible ^^’
                                        Au pire peut-être que le code dans la classe GuiSelectWorld pourrait m’aider, je sais pas…Je vais regarder

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

                                          C’est à dire charger un monde ?

                                          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
                                          • DeletedD Hors-ligne
                                            Deleted
                                            dernière édition par

                                            Exactement comme ceci 😉

                                            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