File Manager

Published by Goldorion on
Supported MCreator versions
2024.1
Tags / plugin type
Procedures
Variables
Icon
Downloads:
5399
Upvotes: 185
Plugin forum topic
About the plugin

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 1.20.1

https://storage.ko-fi.com/cdn/brandasset/kofi_button_blue.png

The 2 following examples require File Manager 5.0 or after.

Create a JSON file

Create a json file

Read a JSON file

Read a JSON file

I made a tutorial covering this here.

Credits/License

Tutorial by NorthWestTrees

Tutorial on sub-JSON objects by NorthWestTrees

Tutorial by Cursed Warrior

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.9

* Updated to MCreator 2024.1.15713
* Added support for NeoForge 1.20.4

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
Project members
Lead developer
License
GNU Lesser General Public License version 2.1 (LGPLv2.1)

Plugin downloads
File Manager 5.9.1 - file-manager_0.zipUploaded on: 04/16/2024 - 18:20   File size: 80.94 KB

Comments

Greetings, I am trying to use it but it gives me this error: https://i.postimg.cc/qRFxM0Mm/0.png, the problem is that it is not referring to the project, the variables are named as local. Can you tell me how I can refer to the project please? I know how to do it manually but I don't want to have to do it manually every time I do a procedure. (Google translator)

https://i.postimg.cc/qRFxM0Mm/0.png
https://i.postimg.cc/T2yZj3m3/1.png
https://i.postimg.cc/15w2T7vx/2.png

Is there a way to delete lines from a file? If not, is there a different way to save persistent data in MCreator?

you propably should add .json5 support which makes it easier. CurseForge is floaded with mods where no description is present in config files. most of those mods are mcreator mods. .json5 allows to add comments.

you could try to add .toml support.
it's indeed possible with the Blocky system MCreator uses.
Since Players use NBTTags/Capabilities to make configs with your plugin this causes way to much issues on Client/Server side modpacks. i really recommend to add this so CurseForge is not Cursed anymore by MCreator mod which doesn't support anything. i'll probably make a post on request forum .. since there a few things which really needs to be changed.

Any potential compatibility with the 1.12.2 generator plugin?

I know many don't like 1.12 mods here but I want to make an addon for the newly released 1.12 port of MineFantasy that uses JSON files to edit recipes

Simply put, I want to use this plugin to make a recipe editing GUI for MineFantasy Reforged

Can I create a normal file or a MOD plug-in file that I am making?

Hey,
I think there's an mistake in File.mkdirs(); method.
File object is a directory and not a file.
As the result of this program creates a folder named file.json instead of file with json expansion xdd.

You can change it to something like:
File file = new File(filePath);
file.getParentFile().mkdirs();

Sorry, my small mistake.
Yes, file variable is file or directory.

But mkdirs() method is only directory so when you want to create file AND new folder hierarchy to it, it creates a folder instead of the file. In that situation it is a mistake, but you just have to add .getParentFile() before .mkdirs() to fix it.

I just read javadoc to be sure >:3.

I can't have this working. Anything I do (I also copy your tutorial) my config file is not created
Im using Mcreator 2021.2 - forge 1.16.5

Could you create one with a read json file? The two examples for writing the file look great, but that assumes the file is already present. There is a [Set Local: configFile to _____] element (purple), but no way to attach the text of the filename. I cannot find any element that can be used to set the file name to read the json file (or check if the file exists) without locking the code and manually updating File file = new File("configfile.json);
Thanks!!

When i try to use the Write text in the file block it makes a folder instead. Is this intended?

Hello
im only able to create files with File Manager but if i try write things in the files i get a silent error with
https://pastebin.com/reAnj4Hb

If i do it like your example picture in the plugin description it wont work.
if i remove the write part it works.
it wont generate or change the code of the class with the write parts.

Already tested the latest build of file manager and one version lower too and also installed all snapshots of mcreator for 1.16.5 to test it with all versions.
Also builded the file manager with gradle on my own to test if uploaded version is maybe broken but nothing help.

Same error everytime.

What im doing wrong xD