Posted December 8, 201311 yr Hi! I wanna ask it, what do you think about it? It is possible? If it is, how? :? They are the main questions I tryed to find it, but i couldn't. [Harder Description] For example: I have gota GuiScreen...mmm like the MainMenu, and i wanna make a button which connect to the "localhost:25565" server by a click. I cant describe more easy.
December 9, 201311 yr There are 2 ways of doing this: Either you use Forge to change GuiMainMenu to MyGuiMainMenu (using If's and Ticks) - this option will work only for one mod (yours) and will cause incompatibility with other MainMenu-changing-mods. Or you just change vanillia code and every time you instal your mod, you change minecraft.jar files :C Note: You can also make Button that will make your account relog to other server INGAME (more compatibility) For example you make Gui that will be shown when you click ,,P" on keyboard and there will be Button that will use Method that will relog you from one server to another or from SP to MP or something. Skipping to code: (I am refering to GuiMainMenu BaseClass editing, to make Ticking stuff with Forge you will just need to use proper methods, hope you know them) //In GuiMainMenu: private void addSingleplayerMultiplayerButtons(int par1, int par2) { //Add this, remember to move around your button to not hide it under others. this.buttonList.add(new GuiButton(ID, this.width / 2 - 100, par1, I18n.getString("MyServer"))); } protected void actionPerformed(GuiButton par1GuiButton) { //Add this: if (par1GuiButton.id == ID) { this.mc.displayGuiScreen(new GuiConnecting(this, mc, "myip.com", 12345)); //this number is port } } Well thats is 1.7.10 is no longer supported by forge, you are on your own.
December 9, 201311 yr There are 2 ways of doing this: Either you use Forge to change GuiMainMenu to MyGuiMainMenu (using If's and Ticks) - this option will work only for one mod (yours) and will cause incompatibility with other MainMenu-changing-mods. Or you just change vanillia code and every time you instal your mod, you change minecraft.jar files :C Note: You can also make Button that will make your account relog to other server INGAME (more compatibility) For example you make Gui that will be shown when you click ,,P" on keyboard and there will be Button that will use Method that will relog you from one server to another or from SP to MP or something. Skipping to code: (I am refering to GuiMainMenu BaseClass editing, to make Ticking stuff with Forge you will just need to use proper methods, hope you know them) //In GuiMainMenu: private void addSingleplayerMultiplayerButtons(int par1, int par2) { //Add this, remember to move around your button to not hide it under others. this.buttonList.add(new GuiButton(ID, this.width / 2 - 100, par1, I18n.getString("MyServer"))); } protected void actionPerformed(GuiButton par1GuiButton) { //Add this: if (par1GuiButton.id == ID) { this.mc.displayGuiScreen(new GuiConnecting(this, mc, "myip.com", 12345)); //this number is port } } Well thats is Or you could use reflection to add a button to the main game gui Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.