* Improve error message when command already exists
* Add app's name to the message
* Add app name to any command load failure and fix commands from new system masking existing ones
* Fix duplicated app name in an error
* Update to recent snapshot changes
* Settings rework and encapsulation
* Settings overhaul 3
Move everything in the new system to a new API package
Require rules using the new system to specify descriptions in their translation files
Implement temporary system on top of current translations to allow that to work properly
* Fix getRules fallback
* Final touches to settings refactor
* Mention that set shouldn't throw and remove comment
* Change translation keys to unify with translation PR
* Deprecate printAllRulesToLog to allow using any PrintStream
* Remove restriction of CarpetRules being Comparable
And fix overreaction in a deprecation message
* Bring back user input to rule observers
* Make Validator deprecation warning not spam on use
* Remove unneeded abstract methods in CarpetRule already inherited from CarpetRule
They literally do nothing, don't even force them to be implemented, and may be confusing as to why they're there or as if they are needed to be implemented
* Fix legacy SettingsManager field not being assigned correctly
* Finish fixing conflicts from future merge
* Actually fix remaining conflicts from future merge (missing imports)
* Import the newer rule in SettingsManager
* Refactor Validators
* Don't spam deprecation warnings on custom managers
* Get out the var
* Fix missing warning in old rule observers
* Update src/main/java/carpet/api/settings/Rule.java
* Remove `@ApiStatus.Experimental` annotations
* Fix incorrect `@deprecated` javadoc tags
By removing them given the class is deprecated anyway and else there's too much noise
* Add missing static import
* Remove TypedField and use a regular field
I liked that class tbh, but it's true that it wasn't really needed
* Move `field` assignment out of for removal
* Fix not following contract of `type()` returning boxed value
Previously handled by TypedField
* Fix few incorrect translation keys
* Remove resaving of comments when saving config files
Comments ignoring is still a thing when reading, so `locked` configs for example will keep comments
* Condense rule load messages in one
* Only print loaded settings message when at least one setting was changed
* Fix legacy validator detector
* Tweak and add more context to response to invalid values
* Fix strict validator not actually erroring on invalid input
* Progress by now.
* Output conversions plus a few extra random things
* More progress, mostly list converting and a way to get converters
* Apply ValueConverters, refactor valueconverter getter to
accept types with annotations and generics, made listconverter pass
those params and annotations recursively. And probably more things.
* Some extra docs, the 100% most important thing
* Added MapConverter, strict Strings and Texts, some docs additions
and commented out heuristics
* Rework StrictParam to use SimpleTypeConverters and be saved in a map
* Minor changes and docs & added non-fully-functional context "converter"
* Added support for variable value count converters, multi-value eaters &
0 value eaters (Context).
* Docs update, enable Context converter, fix minor TODOs
* Move (most) parameter annotations into a single class,
remove deprecated ValueCaster#cast, update some docs.
* Small refactor of Param.Strict registering, added boolean to it
* Added PairConverter, moved Context and LV ValueConverters to Params
* Document public methods of AnnotationParser
* Add a lot more docs, make it ready for the first preview PR
* Move ValueConverter population outside of makeFunction,
check lv size for > max arguments, minor doc updates and workaround for
Mercury#28 until released
* Added optional parameters (declared using Java's Optional),
made evalAndConvert check for the presence of the next iteration,
updated test class
* Generalize Value OutputConverter
* ListConverter and MapConverter now follow ValueConverter contract of
incorrect value handling, returning a complete null for an incorrect
value anywhere. Also small fix to OptionalConverter and docs.
Getting ready for checking null in AnnotationParser!
* Change reflection's #invoke to a MethodHandle to boost speed by a lot
Commented
* Dedupe code, update and remove outdated todos, add 2 new ValueCasters
* Merge lambdas in display_title2 test function to be more accurate
* Check nulls somehow, I guess
* Move base function logic into a class to stop
passing hundreds of parameters into static functions and therefore simplify it
* Reduce visibility and fix a bug with PairConverter
* Hide Context provider in usage report
* Add support for primitive varargs
* Added TheLazyT converter
* Drop #getPrefixedTypeName and use 'something' as name of values
* Use value again because of varargs, document that
* Remove a completed TODO
* Remove old disabled heuristic value type name getter
* Fix TheLazyT
* Preparing locators before touching current Carpet infrastructure
* Add notes about non-implementedness of remaining locators
* Added APIs to register custom ValueConverters
* Mention new APIs in javadocs
* Adapt to new Carpet changes and deprecated non-implemented annotations
* Update example function for display_title()
* Better implementation for player_list example
* Fix example error message
* FunctionArgument no longer has generics
* Modernize Text converters
* OutputConverter is final, plus other small changes
* Few non-behavioural changes
* Rename LazyFunction to ScarpetFunction
* Drop LazyValue in parameters, not in return
Updating docs was a nightmare
* CARPET CHANGE - Make Fluff.AbstractLazyFunction.unpackArgs call unpackLazy (was duped)
* Make errors more like current Scarpet errors
* Allow customizing ContextType when evaluating arguments
* Add a few missing docs, comment out outdated ValueCaster doc
It's been a while, wow
* Fix for new Carpet signature :irritatered:
Please don't break API methods! Extensions may be using them, and they
will just crash the game or behave in unexpected ways else!
* Format all code to Carpet's. Powered by Eclipse
Reviewed to be sure it's ok. No functional changes, except from a small correction
* Always use full name for Context.Type
* Add parsing for all current Scarpet api and language classes
And remove test functions
* Allow void return type
* Fix no param methods
Whoops!
* Remove outdated comment and fix small javadoc linting problem
* Drop Param.TheLazyT in favour of just Context.Type type
And small performance improvement to varargs varargs since fastutil's toArray is crap
* Quote functions in error messages
* Make SimpleTypeConverter independent of ValueCaster
'Real world' usage demonstrated it can be annoying else, mostly for wrapper only values where you just want the wrapped object
* Allow apps to specify mod version requirements
* Allow a function in requires field and move to `readConfig()`
* Add `server_mods` to system_info()
* Add prefixes and default to `=`
* Added docs for `requires` and for `system_info('server_mods')`
* Better docs for requires (mention * and available prefixes)
* Update docs/scarpet/api/Overview.md
* Update docs/scarpet/api/Overview.md
* Update docs/scarpet/api/Overview.md
Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
* Add javadocs to many methods
* Added built-in ways to generate BundledModules and documented them
* Add Eclipse launch files to .gitignore and fix 11 warnings
* Remove many unused imports
* Remove some dead and unused code around app loading
* Allow extensions to have client-side rules in their SettingsManager
Also change tabs to spaces when those changed
* Remove unnecessary classloader param in BundledModule
* Change max tickwarp duration to Integer.MAX_VALUE
* Move RulePrinter into the source so it can be managed by the IDE
* Properly reset hopperCounters when changing worlds
Also change tabs to spaces again and minor tweaks to javadocs
* Run mergedocs even if Full.md was modified
* Update src/main/java/carpet/commands/TickCommand.java
Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>