* add supplier to FlowerBlock so it works with custom MobEffects
* address comments by @Matyrobbrt
* address comments by @ChampionAsh5357
* fix missing exc entry
* remove null check and rename constructor parameter
* Backport grindstone event from 1.19
* Fix several bugs in the original PR related to canceling the event
Fix canceling the event not clearing the result item, causing it to dupe whatever the result with the previous item was
Fix canceling the event running vanilla behavior if vanilla behavior ran at all since the menu was opened and no other listener changed the XP
* Add comments to the test mod explaining the expected behavior
* Clarify docs on behavior of the XP
Makes it clear XP is ignored in on place if the output is empty or the event is canceled
* Fix broadcast changes not being called if the event overrides grindstone behavior
Not sure its strictly needed, but every vanilla branch in the function calls it and its a trivial change.
* Add enabled flag to the test mod
* Improve javadocs
(cherry picked from commit e12c849cc0)
* Formatting fixes
* Apply javadoc suggestions from review
Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com>
* Correct capitalization in event name
* Javadoc improvements
Remove some redundancy in certain javadoc comments
Add @see to the header
Inline single line javadocs
* Add some funny curly brackets next to returns
Seems the kids these days have invented a new way to write return statements in javadocs
* Remove extra dots and capital letters
The return tag apparently puts more dots at the end, and having two dots on each sentence is not in the budget. Have also reached the capital letter quota
* Apply suggestions from code review
Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com>
Co-authored-by: ferriarnus <61201275+ferriarnus@users.noreply.github.com>
Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com>
Previously, the suggestions used the string representation of the enum
through Enum#toString, which can differ from the name of the enum as
required by Enum#valueOf, causing invalid suggestions (both in gui and
through the error message).
Using Enum#name fixes this discrepancy, so now the suggestions are
always valid inputs regardless of the return of Enum#toString.
Fixes#8618
* Jar-In-Jar
* Change to use the custom 4.x SPI.
* Bump JarJar to fix some version range selectors.
* Address requested changes.
* Mark the JiJ locator as a locator.
* Remove the unused imports.
The previous ordering caused LOCATION to be null during the construction
of the UnitSprite INSTANCE, leading to errors as the atlas location for
the sprite would be null.
Fixes#8795
Commands#fillUsableCommands does not handle redirect nodes properly. It
blindly pulls from the cached node map for a redirect node, which may
have no result because the target node of the redirect has not been
visited yet.
CommandHelper#mergeCommandNode is better in this regard, because it
visits the target node of the redirect instead of blindly pulling from
the node map.
Fixes#7551
Manually entering the names of dynamic registries work as expected. The
suggestions for registries didn't include dynamic registries because
they queried the static registries rather than querying all registries
from the server's `RegistryAccess` (which includes both static
registries and dynamic registries).