Posted January 11, 201411 yr public void tick(ClientTickEvent event) { GuiScreen screen = Minecraft.getMinecraft().currentScreen; if(screen instanceof GuiMainMenu) { FMLClientHandler.instance().getClient().func_147108_a(new ANewMainMenu()); }else { } } Every time a build that code above it always changes "GuiMainMenu" to "ANewMainMenu" (or w/e the class name is called)
January 11, 201411 yr 1) Don't use the tick handler, we have an event for this 2) What are you doing? And what is it doing exactly? What is the compiled code? I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 11, 201411 yr Author 1) Don't use the tick handler, we have an event for this 2) What are you doing? And what is it doing exactly? What is the compiled code? if the current gui screen is GuiMainMenu then it will change to ANewMainMenu and the code when I build it public void tick(TickEvent.ClientTickEvent event) { GuiScreen screen = Minecraft.func_71410_x().field_71462_r; if ((screen instanceof ANewMainMenu)) { FMLClientHandler.instance().getClient().func_147108_a(new ANewMainMenu()); } }
January 11, 201411 yr Where are you getting that code? There is nothing that should do that, Got the compiled class so i can take a look? I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 11, 201411 yr Author Where are you getting that code? There is nothing that should do that, Got the compiled class so i can take a look? that is the compiled class
January 11, 201411 yr I'm asking for the actual .class file. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 11, 201411 yr Author I'm asking for the actual .class file. that is still from the class file but here is full code then from class file import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.eventhandler.EventBus; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; @Mod(modid="CustomMainMenu", version="1.7.2") public class CustomMainMenu { @SideOnly(Side.CLIENT) @Mod.EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(this); } @SideOnly(Side.CLIENT) @SubscribeEvent public void tick(TickEvent.ClientTickEvent event) { GuiScreen screen = Minecraft.func_71410_x().field_71462_r; if ((screen instanceof ANewMainMenu)) { FMLClientHandler.instance().getClient().func_147108_a(new ANewMainMenu()); } } }
January 12, 201411 yr -.- When you compile java It creates a file Ending in .class Give me that file How is this fucking hard to get? Or explain to me exactly how you're getting this code. SOMETHING you're doing is screwing things up. There is nothing in our code that would do this. It kinda looks like your code isnt actually updating or you're nto compiling it. If you cant get more details then make a video of what you're doing. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 12, 201411 yr Author -.- When you compile java It creates a file Ending in .class Give me that file How is this fucking hard to get? Or explain to me exactly how you're getting this code. SOMETHING you're doing is screwing things up. There is nothing in our code that would do this. It kinda looks like your code isnt actually updating or you're nto compiling it. If you cant get more details then make a video of what you're doing. Here is a download link but your just gona get the exact same results as Ive already given you !! https://dl.dropboxusercontent.com/s/zrmx258t7x9nc1k/CustomMainMenu.class?dl=1&token_hash=AAFVlIuuMkzct_Ti-9CNXbp9UZBd_eP6ArkvXYj10zlJQg & ive compiled it using build command in gradle (same as in your video ... stop making it complicated (its not its simply)) I know it compiles correctly because ive tried changing "GuiMainMenu" to "GuiOption" & that worked fine ... there is nothing else I can tell you if its not me causes the bugs ... you can try it in your dev environment & tell me your results & if it works there is some BS wrong on my end !
January 12, 201411 yr Ya, I tested out with my own code. There is nothing that is in any of our systems that would cause this. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 12, 201411 yr Author Ya, I tested out with my own code. There is nothing that is in any of our systems that would cause this. so did you test it with the above code? using GuiMainMenu to
January 12, 201411 yr Yes, using my own custom GUI code, as you havent provided everyhting. As I said, there is nothing on our end that would cause this. Your only option is to give me everything you have so I can get your EXACT workspace, or figure it out yourself. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
January 12, 201411 yr Author Yes, using my own custom GUI code, as you havent provided everyhting. As I said, there is nothing on our end that would cause this. Your only option is to give me everything you have so I can get your EXACT workspace, or figure it out yourself. okay thanks thats all I need, I will look into it but the gui code im using shouldnt be causing the ploblem
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.