Update README.md

This commit is contained in:
J. Fronny 2021-02-16 13:21:37 +00:00
parent 48c18179ec
commit e5a2515a24

View File

@ -50,10 +50,9 @@ It also allows the following operations: `and`, `equal`, `nor`/`not`, `or`, `xor
An example can be seen [here](https://gitlab.com/JFronny/respackopts/-/tree/master/run/resourcepacks/lumi/assets/minecraft/lang)
### Fallback resources
Respackopts allows creating fallbacks for resources if they are unavailable/disabled.\
To do this, create a file named `{targetFile}.fbt`.\
This file should contain a simple json array where each element is a reference to a possible fallback file.\
To do this, create a "fallbacks" entry in a files .rpo containing every possible fallback file as a string in an array.\
Use this in conjunction with the conditional resources feature in order to create multiple options for a single texture.\
An example can be seen [here](https://gitlab.com/JFronny/respackopts/-/tree/master/run/resourcepacks/lumi/assets/minecraft/lang)
A simple example can be seen [here](https://gitlab.com/jfmods/respackopts/-/blob/master/run/resourcepacks/lumi/assets/minecraft/lang/de_de.json.rpo)
## Mod developers
All data is available in static HashMaps in `io.gitlab.jfronny.respackopts.Respackopts`.\
To save information, call `Respackopts.save()`, `Respackopts.load()` to load.
@ -61,4 +60,4 @@ To save information, call `Respackopts.save()`, `Respackopts.load()` to load.
then the property name. After that you get the value. Enums are expressed as numbers with enum key names in enumKeys.\
If you need code to be ran after changes are made to the state, add an action to `saveActions`.\
This is currently used for the Canvas/FREX integration, which uses it to generate shader code.\
The config GUI is currently generated using cloth config. The config icon ís loaded from ModMenu. It will not display if that is not loaded.
The config GUI is currently generated using cloth config. The config icon ís loaded from ModMenu. It will not display if that is not loaded.