Posted October 2, 201312 yr I'd like to read some arbitrary files related to my mod. Specifically, these will be images and JSON config files. (I'm aware of the Forge config file format, but it's not suitable for my use case. So JSON it is.) These will not be save-specific files. I.e. they should be global to the Minecraft installation. So I'm thinking they would go somewhere in minecraft/config/NameOfMyMod. First, is this OK? Second, is there an API method I can call which will return the path to my mod's config folder? Once I have that path, I'll be able to read and parse the JSON data. Third, will it be possible use images in the config folder as textures? If not, is there any way to achieve something similar? Essentially, I want my mod to be able to use user-supplied textures. I'd rather not force users to open the .jar file and put them there. If necessary, I'd be willing to read the image data from the files myself, and pass that image data to an API method. I'm targeting MC 1.5.2.
October 3, 201312 yr Config files are already doing this, so yes it is OK. Loader#getConfigDir(); As for images/textures. Resource packs are now a built-in feature of Minecraft. That means users don't have to open your jar. They only need to make a resource pack following your jar structure and add whatever textures they want to change.
October 3, 201312 yr Author Thanks! I've been reading conflicting info on what version of MC introduced resource packs. Are they available in 1.5.2?
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.