Additions
- Port to 1.21
- Added new (undocumented)
cast
andnullCast
extension functions for functional programming style of type casting. Ex: val thing: MyType2 =myType1.cast<MyType2>().withThing().doAnotherThing()
Changes
- Optimized
Expression
with pre-compiled shortcuts for many situations; optimized constant usage. - Expressions now have
hashcode
andequals
methods for direct comparison.
Fixes
- None.
Additions
- Added new (undocumented)
cast
andnullCast
extension functions for functional programming style of type casting. Ex: val thing: MyType2 =myType1.cast<MyType2>().withThing().doAnotherThing()
Changes
- Optimized
Expression
with pre-compiled shortcuts for many situations; optimized constant usage. - Expressions now have
hashcode
andequals
methods for direct comparison.
Fixes
- None.
Additions
- None.
Changes
- Updated the
ValidatedIngredient
interface to a new popup with two list editors, list viewers, and "Clear" buttons. - Added a
supplyTooltipOnOverflow
method toSuppliedTextWidget
that allows for provision of a tooltip in case the text widget overflows and "trims" the input. This can be identical to the text supplier (can be the text supplier instance itself), or can be a separate supplier with, for example, newlines instead of commas separating text elements
Fixes
ValidatedIngredient
now supports both tags and item IDs, instead of just item ids. The constructor now acceptsSet<Object>
, which can be composed of TagKeys and Identifiers (for tags and items, respectively)
Additions
- Added
Supplier
overloads toConfigApi
to provide smoother interop with Java implementations, reducing the need for java mods to add fabric language kotlin to their compile class path. - Added custom
validateAndSet
methods toValidatedIngredient
that allow for direct updating via Identifier, Set, or Tag without having to make your own Ingredient Provider instance first.
Changes
- None.
Fixes
- None.
Additions
- Added
ValidatedEntityAttribute
for configuring paired EntityAttribute/EntityAttributeModifier instances. - Added
SuppliedTextWidget
, a generic TextWidget that renders text from a Supplier of text rather than a static text input. - Added
toSet()
methods inValidatedField
, allowing for quick wrapping of sets in the same manner as the pre-existingtoList()
methods.
Changes
OnClickTextFieldWidget
now renders its displayed text from the beginning, instead of the end.ValidatedString
will throw an exception from the Regex constructor if the regex can't match to the default value givenValidatedDouble
orValidatedFloat
with small ranges now have better slider scaling with keyboard navigation, instead of sticking to increments of 1.0
Fixes
- Fixed
configure
command including all screen subscopes, not just the relevant subscopes - PopupWidget fires mouse released on things when dragged out of bounds
- Fixed
ValidatedEnum
client crash related to certain types of Enums. - Fixed
OnClickTextFieldWidget
improperly trapping keyboard navigation. - Polished fabric.mod.json file to be more accurate to the mod requirements.
Additions
IgnoreVisiblity
annotation. A config marked with ignore visibility can have private/protected etc. fields/props. This was added for backwards compatibility with configs that may be using restricted visibility to store non-config information.
Changes
- The changes button narration was changed from "Manage Changes" to "(Number of changes) Changes Made Button"
- The main de/serializers will now access-widen fields when applicable based on
IgnoreVisiblity
state - try/catch blocks of the main de/serializers expanded to catch more issues without crashing
- Config list entries will narrate their name on hover as well as focus
- Increased max character length of the search box in case of needing to search for long names
- API BREAK -
OnClickTextFieldWidget
now takes anOnInteractAction
instance instead of aConsumer<OnClickTextFieldWidget>
. This lets the text field pass key presses to whatever the widget desires (generally a newly pushed PopupWidget element)
Fixes
- Permission level is now rechecked on GUI opening, preventing you from being locked out of a config if you opened a server config while in the main menu.
- Tab now completes suggestions as it should.
- Changes button now narrates the number of changes made as it should have
- Fixed lang issue with the default descriptions for min- and max-bounded numbers
- The Narrator now properly narrates config list entry tooltips
- Fixed the search bar "trapping" arrow based keyboard navigation even when the search box is empty. Now will pass navigation when it's empty
Additions
Translatable
now has ahasTranslation()
andhasDescription
method in case an inheritor can have valid descriptions or translations other than via the typical I18n key check.Entry Widget
has gained the methodwidgetAndTooltipEntry
, which attempts to apply a description tooltip to a widget, if applicable.
Changes
- Number settings now have a default description that describes the valid range for the selection.
EntryWidget
is no longer a functional interface
Fixes
- Fixed blank line at top of description tooltips.
- Fixed
MapListWidget
not properly firingmouseReleased
on its children when the mouse is released out of that child's bounds. - Fixed suggestion lists not being scrollable or clickable in certain situations.
- Maps, Sets, Lists, and Ingredients properly display their widgets descriptions, if any.
PopupWidgetScreen
now correctly shows tooltips on screen even when popups are open.