Posted April 9, 20169 yr I am trying to make a simple mod where there is fifty "dummy blocks" that you can assign textures to through a texture pack, perfect for a mapmaking scenario. However, I need the json files to be created when the mod is first run. I don't want to write all of the files manually (cut down on file size) so I want to create all of them by code, probably during the preInit cycle, before the actual blocks are initiated. Is there a way to run a specific section of code only when it is the first time running the mod? Thanks in advance, ComputerCraze
April 9, 20169 yr Sure: save a boolean value to your Config file. When you read the config, check if that value is false - if it is, generate the files, set the value to true, and save your config. Next time, the value will be read in as true and the files will not generate; in the future, you can always edit your config file and change the value back to false to re-generate the JSON files. http://i.imgur.com/NdrFdld.png[/img]
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.