File Manager

Published by Goldorion on
Supported MCreator versions
2024.1
Tags / plugin type
Procedures
Variables
Icon
Downloads:
5749
Upvotes: 193
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.10

* [#48] Add a new parameter to write lines at the end of TXT files
  * Note: Existing workspaces will get a build error due to the missing parameter. Previous behaviour was FALSE.
* [Bugfix #62] Write Json object caused a build error due to a missing import (again)

5.9.1

* [Bugfix #61] Some procedure blocks could cause build errors due to a missing import
* Added Persian language support

5.9

* Updated to MCreator 2024.1.15713
* Added support for NeoForge 1.20.4
Project members
Lead developer
License
GNU Lesser General Public License version 2.1 (LGPLv2.1)

Plugin downloads
File Manager 5.10 - file-manager_1.zipUploaded on: 04/23/2024 - 16:43   File size: 81.13 KB

Comments

Here's the generated code, "flagbw.write" doesn't look right:
public static void executeProcedure(Map<String, Object> dependencies) {
String flagname = "";
boolean flagset = false;
File file = new File("");
file = (File) new File((FMLPaths.GAMEDIR.get().toString() + "/config/"), File.separator + "flags.properties");
if (!file.exists()) {
try {
file.getParentFile().mkdirs();
file.createNewFile();
} catch (IOException exception) {
exception.printStackTrace();
}
{
filebw.write("chicken=true");
filebw.newLine();
}
{
filebw.write("pig=true");
filebw.newLine();
}
{
filebw.write("cow=false");
filebw.newLine();
}
}

will 5.6.1 work correctly with MCreator 2023.2 snapshot? If not, is there an eta when an update will be available for support for Forge 1.19.4? Thanks!

I'm having a compilation problem, and I think it's related to the actual plugin, not the mod. Can anyone help?
https://pastebin.com/YBkZ4iGB
The procedure is pretty big, but if you need to take a look at it just let me know.

Also, it would be great if there was a block that could go through all files in a given folder and check for something, but that's a bit of a stretch too probably. :)

Hey, this is sooo helpful. I was thinking that with the new command system, this would be even more useful in conjunction with commands. Could you add a command parameter like "file" or something, kind of like the parameter from the /datapack command. I know there are a few difficulties with that, but see what you think!

I'm having trouble being able to use files in UTF-8 format without BOM, is there any solution? I didn't want to have to type practically everything by hand.