Additions
- Added
ConfigApiJava
which includes methods that may cause IDE issues if called by java code directly from ConfigApi. - Added
translate
helper method toValidatedChoice
for shortcutting common translation/description provider creation. - Added
min(a,b)
andmax(a,b)
toExpression
Changes
ValidatedExpression
widget now includes max and min, and the widget buttons have descriptive tooltips.
Fixes
- Serializer will now ignore a
@ConvertFrom
file candidate if it is missing (already converted, or never existed), rather than tossing an exception into the log.
Additions
- None.
Changes
ValidatedChoice
now has the paramstranslationProvider
anddescriptionProvider
, BiFunctions that let you convert the choices base translation key and an instance of the choice into a Text instance. Useful for creating translations/Descriptions for strings or other choices that aren'tTranslatable
.ValidatedList.toChoices
now lets the user define translation and widget behavior.
Fixes
- Clean up code internally. No external change in behavior
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.