TheBoo99 Posted November 17, 2012 Posted November 17, 2012 Hi, I'm TheBoo99. I'm trying to port a ModLoader mod to forge & SMP, but I get an error. I'm creating a Minecraft instance in my mod file, but I don't know if I should do ModLoader.getMinecraftInstance() or ModLoader.getMinecraftServerInstance(). Sincet the file is universal, I need some way to check if it is server or client. How do I do that? Quote
keepcalm Posted November 17, 2012 Posted November 17, 2012 if (Side.CLIENT.isClient()) { ... } Quote Protip: try and find answers yourself before asking on the forum. It's pretty likely that there is an answer. Was I helpful? Give me a thank you! http://bit.ly/HZ03zy[/img] Tired of waiting for mods to port to bukkit? use BukkitForge! (now with a working version of WorldEdit!)
SanAndreaP Posted November 17, 2012 Posted November 17, 2012 if (Side.CLIENT.isClient()) { ... } wouldn't be this better? if(FMLCommonHandler.instance().getSide().isClient()) {...} Quote Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Recommended Posts
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.