Posted August 24, 201411 yr For my mod i made an item to help me with debugging. It currently sends a chat message with the metadata of the block i use it on but it sends this text message twice. Any help as on why. I'm a beginner with modding so it might be that I'm missing something pretty obvious... also i can't post code right now because I'm on mobile.
August 25, 201411 yr Author Ah well that makes sense is there a way around this? Should i do if(world.isremote ){ ... } Will that fix it?
August 25, 201411 yr I'm quite the beginner too, hehe. I think the person above might've been correct. You might want to redirect the message ONLY to the client, as it might be calling on both server AND client. From my knowledge, you can try putting this before the method that sends the message: @SideOnly(Side.CLIENT) // DO NOT add a ; after this And, you might want to import these two things at the beginning of your code: import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; I hope I help.
August 25, 201411 yr NO! DO NOT USE @SideOnly! Use if (world.isRemote) { // Do things! } -Mitchellbrine Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible. It may be freaking fucking hard though, but still possible If you create a topic on Modder Support, live by this motto: I don't want your charity, I want your information
August 25, 201411 yr Author thanks for the help and and indeed putting it inside of this if(world.isRemote){ ... } does work
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.