Menu principal animé 1.8.1 -> 1.7.10
-
Bonsoir ou bonjour tout le monde
Je galère depuis pas mal de temps à mettre à jour un très vieux code de la béta 1.8.1 (je ne sais pas si c’est la meilleure idée ^^') sur la 1.7.10. C’est une modification du menu principal visant à charger le monde et le joueur comme background. J’ai essayé de remettre le nom des nouvelles méthodes, tout adapter, bref…Je ne vous fais pas l’image mais cependant, je n’ai pas su retrouver l’équivalent de la variable autosavePeriod. Tout ce que je sais, c’est qu’elle a été retirée de MC à partir de la 1.3.2. Après avoir lancé le jeu, il me crée la map et tout et tout, mais ne cesse de de se déco de la map (ou d’essayer), bref c’est trop buggué. Essayer le code chez vous et vous verrez bienL’ancien code (béta 1.8.1)
public class GuiMainMenu extends GuiScreen { public GuiMainMenu() { updateCounter = 0.0F; splashText = "missingno"; renderSplit = 4; hoverText = ""; try { ArrayList arraylist = new ArrayList(); BufferedReader bufferedreader = new BufferedReader(new InputStreamReader((net.minecraft.src.GuiMainMenu.class).getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8"))); String s = ""; do { String s1; if((s1 = bufferedreader.readLine()) == null) { break; } s1 = s1.trim(); if(s1.length() > 0) { arraylist.add(s1); } } while(true); splashText = (String)arraylist.get(rand.nextInt(arraylist.size())); } catch(Exception exception) { } } public boolean OnTickInGame(Minecraft minecraft) { closeTicks++; return true; } public void updateScreen() { updateCounter++; if(renderOption && ModLoader.getMinecraftInstance().thePlayer != null && !ModLoader.getMinecraftInstance().thePlayer.isDead) { ModLoader.getMinecraftInstance().thePlayer.rotationYaw += 0.2F; ModLoader.getMinecraftInstance().thePlayer.rotationPitch = 0.0F; ModLoader.getMinecraftInstance().thePlayer.fallDistance = 0.0F; } } protected void keyTyped(char c, int i) { } public void initGui() { mmactive = true; mc.ingameGUI = new l_GuiIngame(mc); 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(); } } } if(loadingWorld) { loadingWorld = false; } ModLoader.getMinecraftInstance().gameSettings.hideGUI = true; ModLoader.getMinecraftInstance().gameSettings.thirdPersonView = false; StringTranslate stringtranslate = StringTranslate.getInstance(); if(renderOption) { mc.playerController = new PlayerControllerSP(mc); if(mc.theWorld == null) { loadSaves(); String s = getSaveFileName(0); String s1 = getSaveName(0); if(s1 == null || s == null) { renderOption = false; } else { mc.startWorld(s, s1, new WorldSettings(0L, 0, false)); mc.theWorld.autosavePeriod = 0x3b9ac9ff; } } } else if(themeOption) { drawAetherDefaultBackground(); } else { drawDefaultBackground(); } Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); if(calendar.get(2) + 1 == 11 && calendar.get(5) == 9) { splashText = "Happy birthday, ez!"; } else if(calendar.get(2) + 1 == 6 && calendar.get(5) == 1) { splashText = "Happy birthday, Notch!"; } else if(calendar.get(2) + 1 == 12 && calendar.get(5) == 24) { splashText = "Merry X-mas!"; } else if(calendar.get(2) + 1 == 1 && calendar.get(5) == 1) { splashText = "Happy new year!"; } else if(calendar.get(2) + 1 == 8 && calendar.get(5) == 3) { splashText = "We miss you, Ripsand :("; } if(renderOption) { int i = height / 4 + 20; controlList.clear(); controlList.add(new l_GuiButton(1, width / 4 - 100, i, stringtranslate.translateKey("menu.singleplayer"))); controlList.add(multiplayerButton = new l_GuiButton(2, width / 4 - 100, i + 24, stringtranslate.translateKey("menu.multiplayer"))); controlList.add(new l_GuiButton(3, width / 4 - 100, i + 48, stringtranslate.translateKey("menu.mods"))); controlList.add(new GuiButton(5, width - 24, 4, 20, 20, stringtranslate.translateKey("W"))); controlList.add(new GuiButton(6, width - 48, 4, 20, 20, stringtranslate.translateKey("T"))); controlList.add(new l_GuiButton(0, width / 4 - 100, i + 72, stringtranslate.translateKey("menu.options"))); controlList.add(new l_GuiButton(4, width / 4 - 100, i + 96, stringtranslate.translateKey("menu.quit"))); if(mc.session == null) { multiplayerButton.enabled = false; } } else if(!renderOption) { int j = height / 4 + 40; int k = width / 2 + 100; controlList.clear(); controlList.add(new l_GuiButton(1, width / 2 - 110, j, stringtranslate.translateKey("menu.singleplayer"))); controlList.add(multiplayerButton = new l_GuiButton(2, width / 2 - 110, j + 24, stringtranslate.translateKey("menu.multiplayer"))); controlList.add(new l_GuiButton(3, width / 2 - 110, j + 48, stringtranslate.translateKey("menu.mods"))); controlList.add(new GuiButton(5, width - 24, 4, 20, 20, stringtranslate.translateKey("W"))); controlList.add(new GuiButton(6, width - 48, 4, 20, 20, stringtranslate.translateKey("T"))); controlList.add(new l_GuiButton(0, width / 2 - 110, j + 72, 98, 20, stringtranslate.translateKey("menu.options"))); controlList.add(new l_GuiButton(4, (width / 2 + 2) - 10, j + 72, 98, 20, stringtranslate.translateKey("menu.quit"))); if(mc.session == null) { multiplayerButton.enabled = false; } } } 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)) { StringTranslate stringtranslate = StringTranslate.getInstance(); s = (new StringBuilder()).append(stringtranslate.translateKey("selectWorld.world")).append(" ").append(i + 1).toString(); } return s; } private void loadSaves() { ISaveFormat isaveformat = mc.getSaveLoader(); saveList = isaveformat.func_22176_b(); 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 guibutton) { if(guibutton.id == 0) { mc.displayGuiScreen(new GuiOptions(this, mc.gameSettings)); } if(guibutton.id == 1) { mc.displayGuiScreen(new l_GuiSelectWorld(this, musicId)); } if(guibutton.id == 2) { mc.displayGuiScreen(new l_GuiMultiplayer(this, musicId)); } if(guibutton.id == 3) { mc.displayGuiScreen(new GuiTexturePacks(this)); } if(guibutton.id == 4) { mc.shutdown(); } if(guibutton.id == 6) { themeOption = !themeOption; } if(guibutton.id == 7) { mc.displayGuiScreen(null); mmactive = false; musicId = -1; } if(guibutton.id == 5) { changeWorldRender(); } } public void changeWorldRender() { StringTranslate stringtranslate = StringTranslate.getInstance(); if(!renderOption) { renderOption = true; loadSaves(); String s = getSaveFileName(0); String s1 = getSaveName(0); if(s1 == null) { renderOption = false; return; } mc.startWorld(s, s1, new WorldSettings(0L, 0, true)); int j = height / 4 + 20; controlList.clear(); controlList.add(new l_GuiButton(1, width / 4 - 100, j, stringtranslate.translateKey("menu.singleplayer"))); controlList.add(multiplayerButton = new l_GuiButton(2, width / 4 - 100, j + 24, stringtranslate.translateKey("menu.multiplayer"))); controlList.add(new l_GuiButton(3, width / 4 - 100, j + 48, stringtranslate.translateKey("menu.mods"))); controlList.add(new GuiButton(5, width - 24, 4, 20, 20, stringtranslate.translateKey("W"))); controlList.add(new GuiButton(6, width - 48, 4, 20, 20, stringtranslate.translateKey("T"))); controlList.add(new l_GuiButton(0, width / 4 - 100, j + 72, stringtranslate.translateKey("menu.options"))); controlList.add(new l_GuiButton(4, width / 4 - 100, j + 96, stringtranslate.translateKey("menu.quit"))); if(mc.session == null) { multiplayerButton.enabled = false; } } else { renderOption = false; mc.theWorld = null; mc.thePlayer = null; int i = height / 4 + 40; controlList.clear(); controlList.add(new l_GuiButton(1, width / 2 - 110, i, stringtranslate.translateKey("menu.singleplayer"))); controlList.add(multiplayerButton = new l_GuiButton(2, width / 2 - 110, i + 24, stringtranslate.translateKey("menu.multiplayer"))); controlList.add(new l_GuiButton(3, width / 2 - 110, i + 48, stringtranslate.translateKey("menu.mods"))); controlList.add(new GuiButton(5, width - 24, 4, 20, 20, stringtranslate.translateKey("W"))); controlList.add(new GuiButton(6, width - 48, 4, 20, 20, stringtranslate.translateKey("T"))); controlList.add(new l_GuiButton(0, width / 2 - 110, i + 72, 98, 20, stringtranslate.translateKey("menu.options"))); controlList.add(new l_GuiButton(4, (width / 2 + 2) - 10, i + 72, 98, 20, stringtranslate.translateKey("menu.quit"))); if(mc.session == null) { multiplayerButton.enabled = false; } } } public void drawScreen(int i, int j, float f) { if(themeOption) { if(renderOption) { // Tessellator tessellator = Tessellator.instance; // boolean flag = true; // byte byte0 = 15; // byte byte1 = 15; // GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); // GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); // drawTexturedModalRect(byte0 + 0, byte1 + 0, 0, 0, 155, 44); // drawTexturedModalRect(byte0 + 155, byte1 + 0, 0, 45, 155, 44); // tessellator.setColorOpaque_I(0xffffff); // String s2 = "Minecraft Hardcore saison 8 partie 1"; // drawString(fontRenderer, s2, width - fontRenderer.getStringWidth(s2) - 5, height - 20, 0xffffff); // String s3 = "Copyright Mojang AB. Do not distribute."; // drawString(fontRenderer, s3, width - fontRenderer.getStringWidth(s3) - 5, height - 10, 0x505050); } else { drawAetherDefaultBackground(); Tessellator tessellator1 = Tessellator.instance; char c = '\u0112'; int k = width / 2 - c / 2; byte byte2 = 30; GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(k + 30, byte2 + 0, 0, 0, 155, 44); drawTexturedModalRect(k + 185, byte2 + 0, 0, 45, 155, 44); tessellator1.setColorOpaque_I(0xffffff); GL11.glPushMatrix(); GL11.glTranslatef(width / 2 + 90, 70F, 0.0F); GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F); float f1 = 1.8F - MathHelper.abs(MathHelper.sin(((float)(System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F); f1 = (f1 * 100F) / (float)(fontRenderer.getStringWidth(splashText) + 32); GL11.glScalef(f1, f1, f1); drawCenteredString(fontRenderer, splashText, 0, -8, 0xffff00); GL11.glPopMatrix(); drawString(fontRenderer, "Minecraft Hardcore saison 8 partie 1", 2, 2, 0x505050); String s4 = "Copyright Mojang AB. Do not distribute."; drawString(fontRenderer, s4, width - fontRenderer.getStringWidth(s4) - 2, height - 10, 0xffffff); } } else if(renderOption) { Tessellator tessellator2 = Tessellator.instance; boolean flag1 = true; String s = "Minecraft Hardcore saison 8 partie 1"; drawString(fontRenderer, s, width - fontRenderer.getStringWidth(s) - 5, height - 20, 0xffffff); String s1 = "Copyright Mojang AB. Do not distribute."; drawString(fontRenderer, s1, width - fontRenderer.getStringWidth(s1) - 5, height - 10, 0x505050); //drawMiniLogo(); } else { drawDefaultBackground(); Tessellator tessellator3 = Tessellator.instance; char c1 = '\u0112'; int l = width / 2 - c1 / 2; byte byte3 = 30; GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(l + 0, byte3 + 0, 0, 0, 155, 44); drawTexturedModalRect(l + 155, byte3 + 0, 0, 45, 155, 44); tessellator3.setColorOpaque_I(0xffffff); GL11.glPushMatrix(); GL11.glTranslatef(width / 2 + 90, 70F, 0.0F); GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F); float f2 = 1.8F - MathHelper.abs(MathHelper.sin(((float)(System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F); f2 = (f2 * 100F) / (float)(fontRenderer.getStringWidth(splashText) + 32); GL11.glScalef(f2, f2, f2); drawCenteredString(fontRenderer, splashText, 0, -8, 0xffff00); GL11.glPopMatrix(); drawString(fontRenderer, "Minecraft Hardcore saison 8 partie 1", 2, 2, 0x505050); String s5 = "Copyright Mojang AB. Do not distribute."; drawString(fontRenderer, s5, width - fontRenderer.getStringWidth(s5) - 2, height - 10, 0xffffff); } drawString(fontRenderer, hoverText, width - 72, 28, 0xffffff); super.drawScreen(i, j, f); } protected void mouseMovedOrUp(int i, int j, int k) { hoverText = ""; for(int l = 0; l < controlList.size(); l++) { GuiButton guibutton = (GuiButton)controlList.get(l); if(i >= guibutton.xPosition && j >= guibutton.yPosition && i < guibutton.xPosition + guibutton.width && j < guibutton.yPosition + guibutton.height) { switch(guibutton.id) { default: break; case 5: // '\005' hoverText = "Toggle World"; break; case 6: // '\006' if(themeOption) { hoverText = "Normal Theme"; } else { hoverText = "LOTR Theme"; } break; case 7: // '\007' hoverText = "Quick Load"; break; } } } } public void drawMiniLogo() { Tessellator tessellator = Tessellator.instance; byte byte0 = 15; byte byte1 = 15; GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPushMatrix(); GL11.glScalef(0.8F, 0.8F, 0.8F); drawTexturedModalRect(byte0 + 0, byte1 + 0, 0, 0, 155, 44); drawTexturedModalRect(byte0 + 155, byte1 + 0, 0, 45, 155, 44); GL11.glPopMatrix(); tessellator.setColorOpaque_I(0xffffff); } public void drawAetherDefaultBackground() { drawAetherWorldBackground(0); } public void drawAetherWorldBackground(int i) { drawAetherBackground(i); } public void drawAetherBackground(int i) { GL11.glDisable(2896 /*GL_LIGHTING*/); GL11.glDisable(2912 /*GL_FOG*/); Tessellator tessellator = Tessellator.instance; GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/lotr/gui/aetherBG.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); float f = 32F; tessellator.startDrawingQuads(); tessellator.setColorOpaque_I(0x999999); tessellator.addVertexWithUV(0.0D, height, 0.0D, 0.0D, (float)height / f + (float)i); tessellator.addVertexWithUV(width, height, 0.0D, (float)width / f, (float)height / f + (float)i); tessellator.addVertexWithUV(width, 0.0D, 0.0D, (float)width / f, 0 + i); tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0 + i); tessellator.draw(); } public boolean doesGuiPauseGame() { return closeTicks >= 30; } public void onGuiClosed() { mc.gameSettings.hideGUI = false; mc.gameSettings.thirdPersonView = false; } private static final Random rand = new Random(); public static boolean mmactive = false; private float updateCounter; private String splashText; private GuiButton multiplayerButton; public static boolean renderOption; public static boolean themeOption; private List saveList; private int selectedWorld; public int renderSplit; public int closeTicks; public static int musicId = -1; private String hoverText; public static boolean loadingWorld = false; public static GuiAchievement ach; static { renderOption = mod_lotr.worldMenu; themeOption = mod_lotr.lotrMenu; } }
Et le mien que j’ai adapté
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode package fr.mrplaigon.dyingcraft.client.gui; import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Random; import org.lwjgl.opengl.GL11; import net.minecraft.client.AnvilConverterException; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiIngame; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiMultiplayer; import net.minecraft.client.gui.GuiOptions; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiSelectWorld; import net.minecraft.client.gui.achievement.GuiAchievement; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.util.MathHelper; import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldType; import net.minecraft.world.storage.ISaveFormat; import net.minecraft.world.storage.SaveFormatComparator; // Referenced classes of package net.minecraft.src: // GuiScreen, ModLoader, EntityPlayerSP, l_GuiIngame, // SoundManager, GameSettings, StringTranslate, PlayerControllerSP, // WorldSettings, World, GuiButton, GuiButton, // SaveFormatComparator, MathHelper, ISaveFormat, GuiOptions, // l_GuiSelectWorld, l_GuiMultiplayer, GuiTexturePacks, Tessellator, // RenderEngine, fontRendererObj, mod_lotr, GuiAchievement public class CustomMainMenu extends GuiScreen { public static boolean worldMenu = true; public static boolean lotrMenu = true; final long demoWorldSeed = (long)"North Carolina".hashCode(); private WorldSettings worldsettings= new WorldSettings(demoWorldSeed, WorldSettings.GameType.SURVIVAL, true, false, WorldType.DEFAULT); public CustomMainMenu() { updateCounter = 0.0F; splashText = "missingno"; renderSplit = 4; hoverText = ""; try { ArrayList arraylist = new ArrayList(); BufferedReader bufferedreader = new BufferedReader(new InputStreamReader((GuiMainMenu.class).getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8"))); String s = ""; do { String s1; if((s1 = bufferedreader.readLine()) == null) { break; } s1 = s1.trim(); if(s1.length() > 0) { arraylist.add(s1); } } while(true); splashText = (String)arraylist.get(rand.nextInt(arraylist.size())); } catch(Exception exception) { } } public boolean OnTickInGame(Minecraft minecraft) { closeTicks++; return true; } public void updateScreen() { updateCounter++; if(renderOption && Minecraft.getMinecraft().thePlayer != null && !Minecraft.getMinecraft().thePlayer.isDead) { Minecraft.getMinecraft().thePlayer.rotationYaw += 0.2F; Minecraft.getMinecraft().thePlayer.rotationPitch = 0.0F; Minecraft.getMinecraft().thePlayer.fallDistance = 0.0F; } } protected void keyTyped(char c, int i) { } public void initGui() { mmactive = true; mc.ingameGUI = new GuiIngame(mc); 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(); // } // } } if(loadingWorld) { loadingWorld = false; } Minecraft.getMinecraft().gameSettings.hideGUI = true; Minecraft.getMinecraft().gameSettings.thirdPersonView = 0; if(renderOption) { worldsettings.enableCommands(); if(mc.theWorld == null) { loadSaves(); String s = getSaveFileName(0); String s1 = getSaveName(0); if(s1 == null || s == null) { renderOption = false; } else { mc.launchIntegratedServer("Demo_World", "Demo_World", worldsettings); //mc.theWorld.autosavePeriod = 0x3b9ac9ff; } } } else if(themeOption) { drawAetherDefaultBackground(); } else { drawDefaultBackground(); } Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); if(calendar.get(2) + 1 == 11 && calendar.get(5) == 9) { splashText = "Happy birthday, ez!"; } else if(calendar.get(2) + 1 == 6 && calendar.get(5) == 1) { splashText = "Happy birthday, Notch!"; } else if(calendar.get(2) + 1 == 12 && calendar.get(5) == 24) { splashText = "Merry X-mas!"; } else if(calendar.get(2) + 1 == 1 && calendar.get(5) == 1) { splashText = "Happy new year!"; } else if(calendar.get(2) + 1 == 8 && calendar.get(5) == 3) { splashText = "We miss you, Ripsand :("; } if(renderOption) { int i = height / 4 + 20; buttonList.clear(); buttonList.add(new GuiButton(1, width / 4 - 100, i, I18n.format("menu.singleplayer"))); buttonList.add(multiplayerButton = new GuiButton(2, width / 4 - 100, i + 24, I18n.format("menu.multiplayer"))); buttonList.add(new GuiButton(3, width / 4 - 100, i + 48, I18n.format("menu.mods"))); buttonList.add(new GuiButton(5, width - 24, 4, 20, 20, I18n.format("W"))); buttonList.add(new GuiButton(6, width - 48, 4, 20, 20, I18n.format("T"))); buttonList.add(new GuiButton(0, width / 4 - 100, i + 72, I18n.format("menu.options"))); buttonList.add(new GuiButton(4, width / 4 - 100, i + 96, I18n.format("menu.quit"))); if(mc.getSession() == null) { multiplayerButton.enabled = false; } } else if(!renderOption) { int j = height / 4 + 40; int k = width / 2 + 100; buttonList.clear(); buttonList.add(new GuiButton(1, width / 2 - 110, j, I18n.format("menu.singleplayer"))); buttonList.add(multiplayerButton = new GuiButton(2, width / 2 - 110, j + 24, I18n.format("menu.multiplayer"))); buttonList.add(new GuiButton(3, width / 2 - 110, j + 48, I18n.format("menu.mods"))); buttonList.add(new GuiButton(5, width - 24, 4, 20, 20, I18n.format("W"))); buttonList.add(new GuiButton(6, width - 48, 4, 20, 20, I18n.format("T"))); buttonList.add(new GuiButton(0, width / 2 - 110, j + 72, 98, 20, I18n.format("menu.options"))); buttonList.add(new GuiButton(4, (width / 2 + 2) - 10, j + 72, 98, 20, I18n.format("menu.quit"))); if(mc.getSession() == null) { multiplayerButton.enabled = false; } } } 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 guibutton) { if(guibutton.id == 0) { mc.displayGuiScreen(new GuiOptions(this, mc.gameSettings)); } if(guibutton.id == 1) { mc.displayGuiScreen(new GuiSelectWorld(this)); } if(guibutton.id == 2) { mc.displayGuiScreen(new GuiMultiplayer(this)); } if(guibutton.id == 3) { //mc.displayGuiScreen(new GuiTexturePacks(this)); } if(guibutton.id == 4) { mc.shutdown(); } if(guibutton.id == 6) { themeOption = !themeOption; } if(guibutton.id == 7) { mc.displayGuiScreen(null); mmactive = false; musicId = -1; } if(guibutton.id == 5) { changeWorldRender(); } } public void changeWorldRender() { if(!renderOption) { renderOption = true; loadSaves(); String s = getSaveFileName(0); String s1 = getSaveName(0); if(s1 == null) { renderOption = false; return; } //mc.startWorld(s, s1, new WorldSettings(0L, 0, true)); mc.launchIntegratedServer("Demo_World", "Demo_World", worldsettings); int j = height / 4 + 20; buttonList.clear(); buttonList.add(new GuiButton(1, width / 4 - 100, j, I18n.format("menu.singleplayer"))); buttonList.add(multiplayerButton = new GuiButton(2, width / 4 - 100, j + 24, I18n.format("menu.multiplayer"))); buttonList.add(new GuiButton(3, width / 4 - 100, j + 48, I18n.format("menu.mods"))); buttonList.add(new GuiButton(5, width - 24, 4, 20, 20, I18n.format("W"))); buttonList.add(new GuiButton(6, width - 48, 4, 20, 20, I18n.format("T"))); buttonList.add(new GuiButton(0, width / 4 - 100, j + 72, I18n.format("menu.options"))); buttonList.add(new GuiButton(4, width / 4 - 100, j + 96, I18n.format("menu.quit"))); if(mc.getSession() == null) { multiplayerButton.enabled = false; } } else { renderOption = false; mc.theWorld = null; mc.thePlayer = null; int i = height / 4 + 40; buttonList.clear(); buttonList.add(new GuiButton(1, width / 2 - 110, i, I18n.format("menu.singleplayer"))); buttonList.add(multiplayerButton = new GuiButton(2, width / 2 - 110, i + 24, I18n.format("menu.multiplayer"))); buttonList.add(new GuiButton(3, width / 2 - 110, i + 48, I18n.format("menu.mods"))); buttonList.add(new GuiButton(5, width - 24, 4, 20, 20, I18n.format("W"))); buttonList.add(new GuiButton(6, width - 48, 4, 20, 20, I18n.format("T"))); buttonList.add(new GuiButton(0, width / 2 - 110, i + 72, 98, 20, I18n.format("menu.options"))); buttonList.add(new GuiButton(4, (width / 2 + 2) - 10, i + 72, 98, 20, I18n.format("menu.quit"))); if(mc.getSession() == null) { multiplayerButton.enabled = false; } } } public void drawScreen(int i, int j, float f) { if(themeOption) { if(renderOption) { // Tessellator tessellator = Tessellator.instance; // boolean flag = true; // byte byte0 = 15; // byte byte1 = 15; // GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); // GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); // drawTexturedModalRect(byte0 + 0, byte1 + 0, 0, 0, 155, 44); // drawTexturedModalRect(byte0 + 155, byte1 + 0, 0, 45, 155, 44); // tessellator.setColorOpaque_I(0xffffff); // String s2 = "Minecraft Hardcore saison 8 partie 1"; // drawString(fontRendererObj, s2, width - fontRendererObj.getStringWidth(s2) - 5, height - 20, 0xffffff); // String s3 = "Copyright Mojang AB. Do not distribute."; // drawString(fontRendererObj, s3, width - fontRendererObj.getStringWidth(s3) - 5, height - 10, 0x505050); } else { drawAetherDefaultBackground(); Tessellator tessellator1 = Tessellator.instance; char c = '\u0112'; int k = width / 2 - c / 2; byte byte2 = 30; //GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(k + 30, byte2 + 0, 0, 0, 155, 44); drawTexturedModalRect(k + 185, byte2 + 0, 0, 45, 155, 44); tessellator1.setColorOpaque_I(0xffffff); GL11.glPushMatrix(); GL11.glTranslatef(width / 2 + 90, 70F, 0.0F); GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F); float f1 = 1.8F - MathHelper.abs(MathHelper.sin(((float)(System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F); f1 = (f1 * 100F) / (float)(fontRendererObj.getStringWidth(splashText) + 32); GL11.glScalef(f1, f1, f1); drawCenteredString(fontRendererObj, splashText, 0, -8, 0xffff00); GL11.glPopMatrix(); drawString(fontRendererObj, "Minecraft Hardcore saison 8 partie 1", 2, 2, 0x505050); String s4 = "Copyright Mojang AB. Do not distribute."; drawString(fontRendererObj, s4, width - fontRendererObj.getStringWidth(s4) - 2, height - 10, 0xffffff); } } else if(renderOption) { Tessellator tessellator2 = Tessellator.instance; boolean flag1 = true; String s = "Minecraft Hardcore saison 8 partie 1"; drawString(fontRendererObj, s, width - fontRendererObj.getStringWidth(s) - 5, height - 20, 0xffffff); String s1 = "Copyright Mojang AB. Do not distribute."; drawString(fontRendererObj, s1, width - fontRendererObj.getStringWidth(s1) - 5, height - 10, 0x505050); //drawMiniLogo(); } else { drawDefaultBackground(); Tessellator tessellator3 = Tessellator.instance; char c1 = '\u0112'; int l = width / 2 - c1 / 2; byte byte3 = 30; //GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(l + 0, byte3 + 0, 0, 0, 155, 44); drawTexturedModalRect(l + 155, byte3 + 0, 0, 45, 155, 44); tessellator3.setColorOpaque_I(0xffffff); GL11.glPushMatrix(); GL11.glTranslatef(width / 2 + 90, 70F, 0.0F); GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F); float f2 = 1.8F - MathHelper.abs(MathHelper.sin(((float)(System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F); f2 = (f2 * 100F) / (float)(fontRendererObj.getStringWidth(splashText) + 32); GL11.glScalef(f2, f2, f2); drawCenteredString(fontRendererObj, splashText, 0, -8, 0xffff00); GL11.glPopMatrix(); drawString(fontRendererObj, "Minecraft Hardcore saison 8 partie 1", 2, 2, 0x505050); String s5 = "Copyright Mojang AB. Do not distribute."; drawString(fontRendererObj, s5, width - fontRendererObj.getStringWidth(s5) - 2, height - 10, 0xffffff); } drawString(fontRendererObj, hoverText, width - 72, 28, 0xffffff); super.drawScreen(i, j, f); } protected void mouseMovedOrUp(int i, int j, int k) { hoverText = ""; for(int l = 0; l < buttonList.size(); l++) { GuiButton guibutton = (GuiButton)buttonList.get(l); if(i >= guibutton.xPosition && j >= guibutton.yPosition && i < guibutton.xPosition + guibutton.width && j < guibutton.yPosition + guibutton.height) { switch(guibutton.id) { default: break; case 5: // '\005' hoverText = "Toggle World"; break; case 6: // '\006' if(themeOption) { hoverText = "Normal Theme"; } else { hoverText = "LOTR Theme"; } break; case 7: // '\007' hoverText = "Quick Load"; break; } } } } public void drawMiniLogo() { Tessellator tessellator = Tessellator.instance; byte byte0 = 15; byte byte1 = 15; //GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPushMatrix(); GL11.glScalef(0.8F, 0.8F, 0.8F); drawTexturedModalRect(byte0 + 0, byte1 + 0, 0, 0, 155, 44); drawTexturedModalRect(byte0 + 155, byte1 + 0, 0, 45, 155, 44); GL11.glPopMatrix(); tessellator.setColorOpaque_I(0xffffff); } public void drawAetherDefaultBackground() { drawAetherWorldBackground(0); } public void drawAetherWorldBackground(int i) { drawAetherBackground(i); } public void drawAetherBackground(int i) { GL11.glDisable(2896 /*GL_LIGHTING*/); GL11.glDisable(2912 /*GL_FOG*/); Tessellator tessellator = Tessellator.instance; //GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/lotr/gui/aetherBG.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); float f = 32F; tessellator.startDrawingQuads(); tessellator.setColorOpaque_I(0x999999); tessellator.addVertexWithUV(0.0D, height, 0.0D, 0.0D, (float)height / f + (float)i); tessellator.addVertexWithUV(width, height, 0.0D, (float)width / f, (float)height / f + (float)i); tessellator.addVertexWithUV(width, 0.0D, 0.0D, (float)width / f, 0 + i); tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0 + i); tessellator.draw(); } public boolean doesGuiPauseGame() { return closeTicks >= 30; } public void onGuiClosed() { mc.gameSettings.hideGUI = false; mc.gameSettings.thirdPersonView = 0; } private static final Random rand = new Random(); public static boolean mmactive = false; private float updateCounter; private String splashText; private GuiButton multiplayerButton; public static boolean renderOption; public static boolean themeOption; private List saveList; private int selectedWorld; public int renderSplit; public int closeTicks; public static int musicId = -1; private String hoverText; public static boolean loadingWorld = false; public static GuiAchievement ach; static { renderOption = worldMenu; themeOption = lotrMenu; } }
Dernier détail, j’ai repris la map du démo mode comme background en attendant que le système soit fonctionnel, je changerai après. C’est aussi pour cela que certaines méthodes de l’ancien code ne me sont pas encore utiles : j’entends par là, les deux String (int i) qui me permettent d’avoir le nom de la map IG et le nom du dossier. Je m’en servirai une fois que le système sera fonctionnel
Je vous remercies d’avance
Passez une bonne soirée / une bonne journée =D -
Salut,
C’est vraiment pas beau comme code. J’ai regardé vite fait, on dirai qu’il cherche a rendre directement le joueur, et s’il n’existe pas il charge un monde pour que le joueur ne soit plus null. C’est un hack vraiment pas beau.
Il serait plus propre de rendre le modèle du joueur (http://www.minecraftforgefrance.fr/showthread.php?tid=1245) et de se servir de la session pour obtenir l’uuid du joueur et charger son skin. -
Ok merci de ta réponse robin. Mais ça va résoudre le bug de chargement du monde ? Car je sais pas si t’as testé, mais le code n’est pas fonctionnel, et je pense que ça ne vient pas du joueur mais du monde à charger dans le menu.
-
Oui ça devrait le corriger. Je t’ai dit que le code actuel essaye de charge le monde pour faire le rendu du joueur. Ça doit être ça qui cause problème. Si tu rends directement le modèle tu n’aura plus besoin de forcer le chargement d’un monde pour le rendu, donc le comportement restera normal.
-
Bizarre que ce code marche bien en beta 1.8.1 et plus en 1.7.10
Enfin bref je vais faire ce que tu me dis alors -
Bon je me suis recréer un nouveau gui, j’ai (on va dire) réussi à dessiner le modèle 3d du joueur dans le menu grâce au tot de Amateis
Mais c’est quelque peu bugué
Regardez le screen :
Mon codeprivate static ModelBiped testModel = new ModelBiped(); private static final ResourceLocation texture = new ResourceLocation("textures/entity/steve.png"); public void createPlayer(int par1, int par2, float par3) { GL11.glPushMatrix(); GL11.glScalef(1.0F, 1.0F, 1.0F); GL11.glColor3f(1.0F, 1.0F, 1.0F); drawModelPlayerModel(par1, par2, par3); GL11.glPopMatrix(); } private void drawModelPlayerModel(int par1, int par2, float par3) { GL11.glPushMatrix(); GL11.glMatrixMode(5889); GL11.glPushMatrix(); GL11.glLoadIdentity(); ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); GL11.glViewport((scaledresolution.getScaledWidth() - 140) / 2 * scaledresolution.getScaleFactor(), (scaledresolution.getScaledHeight() - 140) / 2 * scaledresolution.getScaleFactor(), 512 * scaledresolution.getScaleFactor(), 300 * scaledresolution.getScaleFactor()); GL11.glTranslatef(-0.75F, -0.1F, 0.0F); //Ici ça gère les dimensions du modèle, largeur, hauteur, longueur //Il est préconfiguré pour un cube ! //S'cadeau c'est bonus ! //A modifier si vous voulez faire le rendu d'un mob ! GL11.glScalef(0.66F, 0.85F, 0.66F); //Permet d'afficher le modèle sous un certain angle Project.gluPerspective(90.599998F, 1.333333F, 9.0F, 180.0F); //Distance de vue (FOV) du modèle dans le "cube invisible" //Essayez 2.0F et vous verrez il sort de l'ecran, c'est de la vraie 3D ! //Non c'est une blague, mais ça zoom pas mal ! float f1 = 1.0F; //A ne pas modifier c'est comme le 5889 d'en haut, et à ce stade j'ai l'impression que c'est comme des ID GL11.glMatrixMode(5888); GL11.glLoadIdentity(); //Pour une jolie luminosité du modèle RenderHelper.enableStandardItemLighting(); //C'est subtile, ça permet de bouger la vue 2D du modèle dans le "cube invisible" si vous modifiez -16.0F //Par -17 ou -18 on le voit sortir par l'arrière du "cube invisible" GL11.glTranslatef(0.0F, -3.6F, -16.0F); //Le FOV GL11.glScalef(f1, f1, f1); //Définit les proportions du modèle un peu comme…. //GL11.glScalef(0.66F, 0.85F, 0.66F); //Mais cette fois si c'est grossier GL11.glScalef(4.0F, 4.0F, 4.0F); //Alors là c'est un peu spécial et marrant ! //Ça permet de rotate le modèle //Mais si vous mettez 20.0F différent de la même méthode un peu plus bas //On peu étirer le modèle, le déformer ! GL11.glRotatef(20.0F, -1.0F, 0.0F, 0.0F); //Applique la texture au Modèle this.mc.getTextureManager().bindTexture(texture); //Expliqué un peu plus haut GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); //La profondeur du "cube invisible" mais je ne suis pas sûr ! float f3 = this.field_74208_u + (this.field_74209_t - this.field_74208_u) * par1; GL11.glTranslatef((1.0F - f3) * 0.2F, (1.0F - f3) * 0.1F, (1.0F - f3) * 0.25F); //Donne de l'épaisseur au modèle, à vous de voir ! GL11.glScalef(1.1F, 1.1F, 0.5F); //Fixe la texture sur le bloc, mob ... //Empêche la texture de changer de position, de pivoter sur elle même GL11.glRotatef(-(1.0F - f3) * 90.0F - 90.0F, 0.0F, 1.0F, 0.0F); //Et une tête à l'envers, UNE ! //Fait pivoter le modèle GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); GL11.glEnable(32826); //Appel de la fonction render() du ModelTROISD testModel.render(Minecraft.getMinecraft().thePlayer, 0.0F, 0.0F, 18.0555F, 0.0F, 0.0F, 0.0625F); GL11.glDisable(32826); RenderHelper.disableStandardItemLighting(); GL11.glMatrixMode(5889); GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight); GL11.glPopMatrix(); GL11.glMatrixMode(5888); GL11.glPopMatrix(); //Désactive la luminosité du rendu RenderHelper.disableStandardItemLighting(); }
-
testModel.render(Minecraft.getMinecraft().thePlayer, 0.0F, 0.0F, 18.0555F, 0.0F, 0.0F, 0.0625F);
->
testModel.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
De toute façon Minecraft.getMinecraft().thePlayer est null. Et la valeur 18.0555F n’a rien à faire là.
Après faudrait peut-être jouer avec les rotations. -
Pourquoi le model du pig apparaît bien et pas celui du joueur, alors ?
-
Ah, tu as utilisé ModelBiped. Essayes plutôt avec ModelPlayer.
Et pour répondre à ta question, aucune idée. -
ModelPlayer n’existe pas, c’est ModelBiped, J’avais déjà regardé avant x)
-
Ah oui, tu es en 1.7.10 x)
J’ai trop l’habitude de la 1.8. -
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 ? -
Non, il faut charger le skin du joueur.
-
Bah ça à la limite, je pourrai le faire plus tard c’est pas la priorité
-
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. -
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. -
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
-
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é.
-
je tâcherais de faire des test de mon côté, je ne te promet rien par contre
-
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é ?