Started by
Goldorion
on
Topic category: Plugins and third-party tools
Plugin's page: https://mcreator.net/plugin/64638/file-creator
File Manager is a plugin adding new procedure blocks allowing you to create and read your files!
File Types
- JSON
- TXT (simple file reader/writer)
- ZIP (5.7+)
Important Information
- This version supports Forge 1.19.4 and 1.20.1 and Fabric .20.1
The 2 following examples require File Manager 5.0 or after.
Create a JSON file
Read a JSON file
I made a tutorial covering this here.
Credits/License
Tutorial on sub-JSON objects by NorthWestTrees
Icon by Tobi-Wan#0482
Licensed under the GNU Lesser General Public License, version 2.1
- Appropriate credit must be provided to the creators and maintainers of this plugin.
- Forked versions of this plugin must be distributed under the same license as this with attribution if distributed.
- Changes must be stated if any modified works are to be distributed.
- Under no circumstances you can state that the original creator endorses modified works.
Changelog
To see a complete changelog of the plugin, check this file.
5.8
* Removed support for Forge 1.18.2, 1.19.2
* Removed support for Fabric 1.19.2
* Re-organized File Manager's categories to use the new parent/children category system
* [#51] Add a Remove JSON property
* [#54] Add Get client's directory
* [#58] Add Get JSON property name at index
* [Bugfix #50] Is JSON object empty caused a build error
* [Bugfix #52] Copy url to file didn't work correctly
Edited by Goldorion on Thu, 02/08/2024 - 02:49
Wow! This is incredible! I could see this coming in handy for config files
You can use it to create your own basic config file 9with a TXT file for example), but a real config file has to be coded of another way. This plugin use the File class of Java and not the Config thing of Forge. Anyways, thank you ^^
Nice work!
Thank you Klemen ^^
1.1
I just released a new version of File Creator.
File Creator 2.0.0:
This new version is incompatible with the previous versions.
https://mcreator.net/plugin/64638/file-creator
https://github.com/Goldorion/MCreatorPluginFiles/releases/tag/2.0.0
Very nice! I can see this come in handy for more advanced functions and configs.
This is a great plugin. Very good job. I am testing this in 1.12.2 and works really smooth so far. I have made a basic config kinda file so the client loads the global settings from the file. Is there a workaround atm to let the client know if there is a file with config and if not then to create one? Right now the way i set it is not to create the file by default (getting errors in console that procedure couldn't find the file) and force the client to create the file once the player try to change the settings with my in-game guide book.
The previous setting i had was to create the file on world load but like this i couldn't load the settings from the file. I was keep recreating the file from template.
But yet anything i tried so far (except this) it worked like a charm in general so yea. gg for this great plugin. I am gonna implement this in my mods for sure.
Thank you a lot! I'm glad to see it's useful for some users.
About your question, I'm not sure to understand what you want. Do you mean, something to check if the file exists and if not, create the file? If you are talking about that or something similar, I already make this before creating the file, but I didn't test with Forge 1.12.2 (even if it should work the same way as it's a Java feature and not a Forge feature).
Yea that's exactly what i want to do. If there is already a file with this name, to skip creation and start reading. I only tested this in 1.12.2.
By now, i have already found a workaround kinda. I added an else {} code in the procedure when the world loads. Exactly after the if (!file.exists()) {} and made it load a different procedure inside the else statement, that only reads the file. If that makes sense because i don't know anything about java and forge. But it worked and doesn't overwrite my file and my pc didn't explode so all good.
For my needs, this plugin is extremely useful. I can't thank you enough for this plugin.
I think what you made for the file, but if it's really that, I can't make it because I can't make something similar than the if else block. I'm sorry for that because MCreator has a bad support of Blockly currently. However, I tried many times, and when you make your procedure properly, it shouldn't overwrite the file.
So I can finally make a config file?????
If I can I will try to add a custom kind of lucky block (it will be way different than the original lucky blocks mod)
Yeah, you can make basic config files with this plugin.