Résolu Comment Ajouter un bouton pour se connecter à un serveur 1.7.10 ?

ZCriim

Membre
Inscription
27 Janvier 2012
Messages
89
Réactions
10
Points
3 603
RGCoins
0
Bonjour, alors voila j'ai un problème je cherche à savoir comment ajouter un bouton pour se connecter à un serveur directement en 1.7.10 mais je troupe rien.
Merci a ceux qui peuvent m'aider ou ceux qui peuvent me le faire sa serais aussi bien :D
 
Salut,

Regarde mon tutoriel j'explique comment modifier MCP
Lien : http://reality-gaming.fr/threads/modifier-le-client-minecraft-avec-mcp-partie-2.247503/

Bonne matinée.
Faragnight

Sa m’intéresse pas l est en 1.6 et les code source on changer mais merci
 
Sinon tu peux m'en faire un de boutton ?
Nous allons ajouter une ligne dans ce code :

Code:
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, var3 + 60 * 1, I18n.func_135053_a("Se connecter sur mon serveur")));
Voici le code en entier
Code:
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, par1, I18n.func_135053_a("menu.singleplayer")));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, par1 + par2 * 1, I18n.func_135053_a("menu.multiplayer")));
//J'ai ajouter la ligne ICI
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, var3 + 60 * 1, I18n.func_135053_a("Se connecter sur mon serveur")));
this.buttonList.add(this.field_130023_H = new GuiButton(14, this.width / 2 - 100, par1 + par2 * 2, I18n.func_135053_a("menu.online")));
this.field_130023_H.drawButton = false;
Une fois ce code ajouter nous allons aller déclarer le bouton en début de class

Code:
public GuiButton buttonConnecte;

Une fois tout ce code ajouter vous allez voir apparaître un bouton :)
 
Nous allons ajouter une ligne dans ce code :

Code:
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, var3 + 60 * 1, I18n.func_135053_a("Se connecter sur mon serveur")));
Voici le code en entier
Code:
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, par1, I18n.func_135053_a("menu.singleplayer")));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, par1 + par2 * 1, I18n.func_135053_a("menu.multiplayer")));
//J'ai ajouter la ligne ICI
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, var3 + 60 * 1, I18n.func_135053_a("Se connecter sur mon serveur")));
this.buttonList.add(this.field_130023_H = new GuiButton(14, this.width / 2 - 100, par1 + par2 * 2, I18n.func_135053_a("menu.online")));
this.field_130023_H.drawButton = false;
Une fois ce code ajouter nous allons aller déclarer le bouton en début de class

Code:
public GuiButton buttonConnecte;

Une fois tout ce code ajouter vous allez voir apparaître un bouton :)
Tu veux pas me le faire car j'ai pas ça du tout
 
Envoi ton code

/**
* Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.
*/
private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)
{
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0])));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0])));
this.buttonList.add(new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0])));
}

/**
* Adds Demo buttons on Main Menu for players who are playing Demo.
*/
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
{
this.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format("menu.resetdemo", new Object[0])));
ISaveFormat var3 = this.mc.getSaveLoader();
WorldInfo var4 = var3.getWorldInfo("Demo_World");
 
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0])));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0])));
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, p_73969_1_ + 60 * 1, I18n.format("Se connecter sur mon serveur")));
this.buttonList.add(new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0])));
 
Cette réponse a aidé l'auteur de cette discussion !
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0])));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0])));
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, p_73969_1_ + 60 * 1, I18n.format("Se connecter sur mon serveur")));
this.buttonList.add(new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0])));
je test je te dit ça
 
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0])));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0])));
this.buttonList.add(buttonConnecte = new GuiButton(50, this.width / 2 - 100, p_73969_1_ + 60 * 1, I18n.format("Se connecter sur mon serveur")));
this.buttonList.add(new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0])));


ça fait ça:
1414442523-capture.png
 
Retour
Haut