Main menu custom info serveur
-
Mais dans mon code j’ai modifié et mis les " : " et cela ne change rien et pour l’ip chiffré je viens de tester et aucun changement.
-
@‘Degraduck’:
Mais dans mon code j’ai modifié et mis les " : " et cela ne change rien et pour l’ip chiffré je viens de tester et aucun changement.
C’est-à-dire “aucun chargement” ?
-
bah que je mettes un " . " ou " : " ou alors en chiffre ou avec la redirection minefus.fr cela fais le même résultat.
-
Mets :, ça doit être un double point.
Si ça ne fonctionne toujours pas, il y a un autre problème. -
j’ai mis un double point et cela ne fonctionne toujours pas.
-
Envoie-moi un zip de ton dossier src, je vais regarder de mon côté.
-
Edit : je t’envoie les sources en MP même si cela ne me dérange pas forcèrent
-
Tu aurais pu l’envoyer à robin en MP, là tout le monde peut prendre tes sources.
Envoyé de mon Nexus 4 en utilisant Tapatalk
-
Sachant que de toute façon ce n’est que le copier/coller d’un tuto je ne vois pas où est le problème …
Je regardes ça, je m’occupe d’abord du problème de XeNe
-
Bah oui c’est pour cela que j’avais mis les sources ici, mais bon. Pas de soucis.
-
Bon le problème est vraiment tout con en fait.
Ton code fonctionne. Il affiche bien ce qu’il faut. Sauf que juste après le rendu du menu cache le texte …
Il faut mettre ton code à la fin de la fonction drawScreen : public void drawScreen(int x, int y, float partialTick) { GL11.glDisable(GL11.GL_ALPHA_TEST); this.renderSkybox(x, y, partialTick); GL11.glEnable(GL11.GL_ALPHA_TEST); Tessellator tessellator = Tessellator.instance; short short1 = 274; int k = this.width / 2 - short1 / 2; byte b0 = 30; this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215); this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE); this.mc.getTextureManager().bindTexture(minecraftTitleTextures); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); if((double)this.updateCounter < 1.0E-4D) { this.drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44); this.drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44); this.drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44); this.drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44); this.drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44); } else { this.drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 155, 44); this.drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44); } tessellator.setColorOpaque_I(-1); GL11.glPushMatrix(); GL11.glTranslatef((float)(this.width / 2 + 90), 70.0F, 0.0F); GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F); float f1 = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * (float)Math.PI * 2.0F) * 0.1F); f1 = f1 * 100.0F / (float)(this.fontRendererObj.getStringWidth(this.splashText) + 32); GL11.glScalef(f1, f1, f1); this.drawCenteredString(this.fontRendererObj, this.splashText, 0, -8, -256); GL11.glPopMatrix(); String s = "Minecraft 1.7.10"; if(this.mc.isDemo()) { s = s + " Demo"; } List <string>brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings(true)); for(int i = 0; i < brandings.size(); i++) { String brd = brandings.get(i); if(!Strings.isNullOrEmpty(brd)) { this.drawString(this.fontRendererObj, brd, 2, this.height - (10 + i * (this.fontRendererObj.FONT_HEIGHT + 1)), 16777215); } } String s1 = "Copyright Mojang AB. Do not distribute!"; this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1); if(this.field_92025_p != null && this.field_92025_p.length() > 0) { drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512); this.drawString(this.fontRendererObj, this.field_92025_p, this.field_92022_t, this.field_92021_u, -1); this.drawString(this.fontRendererObj, this.field_146972_A, (this.width - this.field_92024_r) / 2, ((GuiButton)this.buttonList.get(0)).yPosition - 12, -1); } int a = 20; // ici this.info.drawIcon(this.width / 2 - 100 + a, 60 + a + 20); this.drawString(this.fontRendererObj, this.info.getMOTD(), 10, 20, 0xffffff); this.drawString(this.fontRendererObj, this.info.getIP(), 10, 30, 0xffffff); this.drawString(this.fontRendererObj, this.info.getVersion(), 10, 40, 0xffffff); this.drawString(this.fontRendererObj, String.valueOf(this.info.getAcceptTexture()), 10, 50, 0xffffff); this.drawString(this.fontRendererObj, String.valueOf(this.info.getPing()), 10, 60, 0xffffff); super.drawScreen(x, y, partialTick); }par contre un conseil, vire les accents dans ton code. Ou alors passe ta workspace en UTF8, sinon tu vas avoir des problème lors de la compilation.</string>
-
Ah merci beaucoup, j’y aurai pas pensé, et j’ai pas mis d’accents si? Sinon une petite question, il est possible de virer l’ecriture de forge en bas là où il y à marqué 4 mods loaded et tout?
-
Dans les commentaires, il y a des accents de temps en temps.
Pour l’écriture de Forge, oui c’est possible, mais cacher le fait que tu utilises Forge est une infraction à la licence de Forge. Tu peux toujours le rendre plus discret. -
D’accord, donc si je le met en plus petit ça passe et si je laisse juste la ligne qui dit que forge est présent c’est bon aussi? et j’ai un autre soucis, quand je lance mon jeu via eclipse mes infos serveur sont bien là mais que je le met sur mon minecraft mes infos n’apparaissent pas.
-
@‘Degraduck’:
D’accord, donc si je le met en plus petit ça passe et si je laisse juste la ligne qui dit que forge est présent c’est bon aussi? et j’ai un autre soucis, quand je lance mon jeu via eclipse mes infos serveur sont bien là mais que je le met sur mon minecraft mes infos n’apparaissent pas.
regarde les logs.
-
Tu as bien refait un gradlew build après modification ?
-
Oui , j’ai bien fais un gradlew build.
Edit: J’avais juste un soucis avec un : au lieu de ; et cela ne me mettais pas d’erreur enfin pour ce soucis résolu sauf que mon mod refuse de me trouver le serveur , il me met can’t reach serveur à chaque fois alors que mon serveur est bien ouvert.
http://gyazo.com/4f05bf0f8e098c4eca6861741382e79e et j’ai cela dans les logs de mon jeu:
:::
12:01:41] [Client thread/WARN]: Failed to load texture: minecraft:/gui/icons.png
java.io.FileNotFoundException: minecraft:/gui/icons.png
at net.minecraft.client.resources.FallbackResourceManager.func_110536_a(SourceFile:51) ~[bqq.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SourceFile:55) ~[brg.class:?]
at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SourceFile:29) ~[bpu.class:?]
at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(SourceFile:72) [bqf.class:?]
at net.minecraft.client.renderer.texture.TextureManager.func_110577_a(SourceFile:40) [bqf.class:?]
at com.degraduck.minefusmainmenu.client.ApiInfo.drawIcon(ApiInfo.java:84) [ApiInfo.class:?]
at com.degraduck.minefusmainmenu.client.GuiCustomMinefusMainMenu.func_73863_a(GuiCustomMinefusMainMenu.java:646) [GuiCustomMinefusMainMenu.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1061) [blt.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990) [bao.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887) [bao.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at fr.minecraftforgefrance.updater.Updater.runMinecraft(Updater.java:133) [updater-1.0.7.jar:?]
at fr.minecraftforgefrance.updater.Updater.onFinish(Updater.java:145) [updater-1.0.7.jar:?]
at fr.minecraftforgefrance.common.ProcessInstall.finish(ProcessInstall.java:309) [updater-1.0.7.jar:?]
at fr.minecraftforgefrance.common.ProcessInstall$1.run(ProcessInstall.java:153) [updater-1.0.7.jar:?]
[12:01:41] [Thread-17/INFO] [STDOUT]: [com.degraduck.minefusmainmenu.client.ApiThreadConnection:getInfo:171]::::
-
Tu as bien mit un double point entre le port et l’ip du serveur ?
-
Oui, j’ai même essayé avec l’ip chiffré en celle redirigé avec mon nom de domaine.
-
Le soucis persiste, des idées?
