Posted March 29, 201312 yr I'd like my config file to contain a list of block ids that my entities can interact with. I have no idea how to do it. I've played around with it but still haven't got a way. Anyone know an easy way of doing this? Thanks. The enders are everywhere. You can't escape...
March 29, 201312 yr Author I may be new to the forums, but I am not thick. I've googled it lots of times, and searched it on the forums. I'm wanting something like this in the config file: blockToInterect: { -19 -4 -52 } something where the users can add to the list if they wish. The enders are everywhere. You can't escape...
March 29, 201312 yr I am sorry but the link I gave you gave you the right answer String someInputThingy = cfg.get(Configuration.CATEGORY_GENERAL, "blockIDList", "1,2,55,74,14,453").getString(); String[] toStringArray = someInputThingy.split(","); int[] blockIds = new int[toStringArray.length]; for(int i = 0; i < toStringArray.length; i++) { try { blockIds[i] = Integer.parseInt(toStringArray[i]); } catch(NumberFormatException numberFormatException) { numberFormatException.printStackTrace(); } }
March 29, 201312 yr Author Thanks. Sorry for the confusion. The enders are everywhere. You can't escape...
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.