Posted February 16, 201411 yr I'm successfully sending the player status updates via their actions in my mod, but the chat fills up really fast when it posts twice. The code is only in the class once, but no matter where I put it (troubleshooting) it shows up twice. par3EntityPlayer.addChatMessage(new ChatComponentText("A chatty chat message for you!")); I'm wondering if the onItemRightClick() is running twice, or if the ChatComponentText is. Although, I've tried to use the minecraft way and it still double posts. Any insight? Is this a bug, "just the way it is" or more likely... is it my erroneous code? http://i43.tinypic.com/95v5n9.png[/img]
February 16, 201411 yr add @SideOnly(Side.CLIENT) or @SideOnly(Side.SERVER) above your method like when you do the @EventHandler Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
February 16, 201411 yr Author Still posting twice. I was sure that was going to work too. Any other ideas? http://i43.tinypic.com/95v5n9.png[/img]
February 16, 201411 yr Author @Jdb100: @SideOnly is for distinguishing between Dedicated Server & Minecraft Client. So Stuff with @SideOnly(Side.CLIENT) will still be present on the Intergrated server (but not on the dedicated one). @navybofus: Use world.isRemote to check on which side you are. isRemote == true means you are client. Wow, a small little if statement was jacking me up that bad... I guess that's what I get for working in code all day. Thanks so much. No more alienated mod users wondering why every status is double posted. http://i43.tinypic.com/95v5n9.png[/img]
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.