* Add resource conditions to dynamic registries
* Support conditions in FabricDynamicRegistryProvider
- Add matching overloads for all add(...) methods which take a varargs
list of ResourceConditions.
- Add an additional overload for registering RegistryEntry.References
directly. This makes it a little easier to register directly from a
RegistryBuilder.
* Throw error if we cannot add resource conditions
* Rename EntryWithConditions to ConditionalEntry
(cherry picked from commit a5d5299dfb)
- Add all dynamic registries to the initial registry.
- Expose a getter for the registry future.
- Register cloners for all dynamic registries.
(cherry picked from commit ad4744939b)
* Initial move to codec-based resource conditions
* Move default condition types to DefaultResourceConditionTypes
* Move built-in condition types to impl
* Run spotlessApply
* Move default condition registration to entrypoint in imp
* Formatting fixes
* Add back package-info.java
* Make it compatible with new DFU
* checkstyle
* Refactor FeaturesEnabledResourceCondition
* Pass RegistryWrapper and reduce reliance on statics
* Some more improvements
* Add back some tests
* Add more tests
* Add back tags_populated support, clean up code
* Some more improvements
* add javadocs (wip)
* Fix unfixed merge conflict
* Javadocs
* Fix null condition in addConditions
* Allow empty arrays in certain codecs
* Move addConditions to datagen impl
* Address reviews
* add debug log
* Store features in normal static field
* Fix TagsPopulatedResourceCondition#getType
---------
Co-authored-by: Apollo <102649729+Apollounknowndev@users.noreply.github.com>
* Fix wrong ops being used in AttachmentSerializingImpl
* Remove unused private method
* Require and use registry future in advancements and loot tables
* Add CompletableFuture to FabricCodecDataProvider
* Deprecate the old method and constructor, and fix the style
* Fix the style for real this time
* Add exceptions to the configure methods
* Apply suggestions from code review
---------
Co-authored-by: modmuss <modmuss50@gmail.com>
(cherry picked from commit 5c013344f0)
Breaking changes:
- `FabricBrewingRecipeRegistry.registerPotionRecipe` takes `RegistryEntry<Potion>` instead of `Potion`
- `SculkSensorFrequencyRegistry.regster` takes `RegistryKey<GameEvent>` instead of `GameEvent`
- `FabricLanguageProvider.add` takes `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `FabricTagProvider.GameEventTagProvider` was removed replace with `FabricTagProvider<GameEvent>`
- `FabricItem.getAttributeModifiers` returns a Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `ModifyItemAttributeModifiersCallback.modifyAttributeModifiers` takes Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
* Add JsonKeySortOrderCallback
* Use an entry point rather than an event for sort keys and priorities
* Resolve static imports
* Add a bit of javadoc
* Check if a key is null and modify the javadoc
* Add a field reference in the javadoc
* Rename JsonKeySortOrderAdder to JsonKeySortOrderCallback
(cherry picked from commit 0883a8d4d9)
* Fix datagen for custom dynamic registry
* Test datagen for custom dynamic registry
* Check if the dynamic registry is registered with Fabric API
* Cleanup testmod
* Don't apply to registries not added using the fabric api.
---------
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* Some more TAWs
Added some TAWs for various methods in `Blocks` used to create certain types of blocks that mods may want to also create. Using these methods will allow them to ensure they have all the right block settings they need to stay consistent with vanilla blocks that use the same methods.
* Add some fields from BlockLootTableGenerator
useful fields from BlockLootTableGenerator. also cleaned up the datagen api's accesswidener file
* Add API for adding custom dynamic registries
Closes#1012, supersedes #1031 and #2719.
* Add missing license headers
* Clarify RegistryLoaderMixin namespace injection
* Replace event with static registration, add skeleton for sorting registries
* Fix typo
* Refactor event phase sorting system for use with dynamic registries (#1)
* Make minor changes to Technici4n's PR
* Add test for nested dynamic objects
* Revert "Add test for nested dynamic objects"
This reverts commit 486e3e1ce0.
* Revert "Make minor changes to Technici4n's PR"
This reverts commit 741bd52c1e.
* Revert "Refactor event phase sorting system for use with dynamic registries (#1)"
This reverts commit bb7c8b8790.
* Remove sorting API
* Add support for defaulted dynamic registries
* Re-add test for nested dynamic objects
* Add missing license headers
* Fix typo
* Remove defaulted dynamic registries; flatten registration methods
* Remove last reference to registry sorting
* Add option to skip syncing for empty dynregs
* Update DynamicRegistrySyncOption docs
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
* Address review feedback
* Add registry namespace to tag paths for modded registries
* Move dynamic registry tests into their own class for readibility
* Finish DynamicRegistries doc
* Only apply tag change to dynamic registries
* Fix checkstyle
* Update fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/api/event/registry/DynamicRegistries.java
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
---------
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>