Additions
- Added
ValidatedField
mapping. Validation can be mapped to validation of any other convertible type with the newmap
methods.- New helper class
ValidatedRegistryType
mapsValidatedIdentifier
to registry objects, allowing for easy direct implmentation of setting based on registry objects (Items, Blocks, etc) without having to later map the identifiers yourself.
- New helper class
ValidatedField
now has a helpercodec
method for generating a Codec of the underlying type.ValidatedField
now has a listener system that triggers on anyset
of the field. This listener is aConsumer<ValidatedField<T>>
and is added withwithListener
- Added
EventApi
and corresponding direct implementations in theConfig
class- like other sub-apis, access this Api through the
ConfigApi
onSyncClient
- fires when a config is synced to a clientonUpdateClient
- fires when a config is updated in-game on the client sideonUpdateServer
- fires when a config is updated in-game on the server side
- like other sub-apis, access this Api through the
- Added
ConfigAction
, which can be used to add arbitrary on-click buttons in the Config GUI. Use them to link to your wiki, open a patchouli guide book, give the player an item, etc. - Added extremely basic
PlatformApi
for simple cross-loader tasks like checking if the game state is client-sided or not.
Changes
- Specialized widgets no longer internally extend
PressableWidget
orButtonWidget
, which was causing issues with Visual Overhaul or any other mod that leaks the constructor of the widget. It is recommended to use theCustom
variants of those classes for any custom validation implementation.
Fixes
ValidatedIdentifier
can now bind to dynamic registries using theofRegistryKey
initializer methods.- Fix syncing on login not working.
- Fixed updates on client-only configs sometimes blasting the log with the full config contents.
Additions
- None
Changes
- None
Fixes
- Revert
@JvmStatic
addition in ConfigApi that accidentally breaks code using the previous way, thanks to Kotlins assertion of an "additional" static simply being false (it replaces with a static)
Additions
- Added new helper extension functions to
FcText
.MutableText#command
cleanly defines a Run Command click actionMutableText#tooltip
adds a hovered tooltip to textMutableText#underline
underlines the textMutableText#bold
bolds the textMutableText#italic
italicizes the textMutableText#strikethrough
strikes through the textMutableText#colored
colors the text with any RGB colorAny#transSupplied
translates the receiver, with a supplied fallback literal if necessary. Useful if the fallback is computationally intensiveAny#descSupplied
describes the receiver, with a supplied fallback literal if necessary. Useful if the fallback is computationally intensive
- Added new
Translation
annotation. Yet another way to translate your in-game config settings!- If applied to a config, section, or object, all the settings within will use the prefix provided in their translation keys instead of the normal class-path based one.
- If applied to a setting, that setting will use the specified prefix. It can also be used to turn off translation for a setting if you want the normal translation scheme to apply for all settings except the negation-annotated ones.
- With a prefix, your settings will have a lang key of
prefix.[fieldName]
andprefix.[fieldName].desc
. This applies to all instances of the field, so repeating units of the same setting will share a lang key!
- Added new "Not in Game" uneditable setting to better show that you need to connect to a world to access it.
- Added new client commands that technically can be used in-game or for other purposes. Mostly they are "internal" for use with the changed action messages.
/fzzy_config_restart
shuts down the client/fzzy_config_leave_game
disconnects you from the current game and returns you to the proper title screen./fzzy_config_reload_resources
reloads resources (F3+T)
Changes
- Action chat messages now include a click event with commands corresponding to the needed action (
RELOG
will have a leave game click action, and so on)
Fixes
- Config screens properly understand when you are not in a game, or when the config is client-only. Configs accessed outside a game should more accurately display the settings you have access to
- Documentation mod links point to the mod pages now instead of the Modrinth/CF homepage.
- Fixed missing docs and
@JvmStatic
forConfigApi#network