The plugin continues its journey here.
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
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.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
Comments
Would it be possible with the gson library to make it be able to get key's of nth element?
So lets say I loop through a json object and I want to get the first elements key
Because id like to ease the use of my config, instead of doing:
```
"item1": {
"name": "minecraft:gravel",
"amntPerProcess": 8,
}
```
Id like to do:
```
"minecraft:gravel": {
"amntPerProcess": 8,
}
Well yeah, great plugin, but how to actually properly make a new config file at start and not do "A block is broken"
Like it doesnt work with "Mod loaded on server-side" because it bugs out not making a proper file closing, its missing an "}" at the end and also breaks any formatting of the file flattening all tabs (and I suck at Java so I dont wanna attempt using this in code, couldnt properly fix it so far)
Yeah actually even just creating a "file" variable breaks it the same way as doing any more with the procedure, while "Mod loaded on server-side" is being used as the global trigger
Lookin like this:
```
import java.io.File;
public class GenerateConfigProcedure {
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = {Dist.DEDICATED_SERVER}) public class GenerateConfigProcedure {
@SubscribeEvent public static void init(FMLDedicatedServerSetupEvent event) {
execute();
}
public static void execute(
) {
File file = new File("");com.google.gson.JsonObject mainJsonObject = new com.google.gson.JsonObject();
}
}
HERE SHOULD BE ANOTHER ENDING BRACKET
```
perhaps start by stating which version of the Plugin, what version of MCreator and what generator version you using? I've been using this plugin (v5.7.3) for quite a while now and have no issues with it for Forge 1.20.1, MCreator 2023.3 and 2023.4 as well as older versions.
True, my bad, but its just not too well explained how to properly implement the basic saving; which in my opinion should probably be as soon as the mod is loaded on the server-side (depending on the mod)
In the screenshot its just an empty procedure and in the preview video its on "A block is broken" like just why
I am using 5.7.3 on 2023.3 with the Fabric loader, should have probably tested on Forge
no need, I added a procedure block to the JEI plugin to allow you to get the recipe results directly through procedures.