Posted January 11, 201312 yr Hello, I wanted to ask if someone knows any command to check for certain mod(probably by modId) in postInit method. something like if(modListContains("someModId")) { //do some stuff } Thanks in advance Sorry for mistakes, English is not my mother tongue
January 11, 201312 yr i use for RedPowerWorld Integration @PostInit public void modsLoaded(FMLPostInitializationEvent event) { if (Loader.isModLoaded("RedPowerWorld")) { try { rp2Stone = (Block) Class.forName("com.eloraam.redpower.RedPowerWorld").getField("blockStone").get(null); //sniped the things that i do with that } LogHelper.log(Level.INFO, "Loaded RP2 World addon"); } catch (Exception e) { LogHelper.log(Level.SEVERE, "Could not load RP2 World addon"); e.printStackTrace(System.err); } } }
January 11, 201312 yr Author Thank you, that's exactly what I was looking for! I'll give it a try Sorry for mistakes, English is not my mother tongue
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.