Changes

Summary

  1. Add a "field" for error factories (details)
  2. Add an option to create a direct field from a loader registry without mapping the type key (details)
  3. Make NamedComponentRegistry registration threadsafe (details)
Commit 60b233ccea4eabe7d94c5a000be7e5d59e0ad9ae by KnightMiner
Add a "field" for error factories

Allows throwing the proper exception type in the constructor for throwing constructors since fields know whether they are in JSON or buffers (constructors don't)
The file was modifiedsrc/main/java/slimeknights/mantle/data/loadable/ErrorFactory.java (diff)
The file was addedsrc/main/java/slimeknights/mantle/data/loadable/field/ConstantField.java
Commit a16021cb5fabbd7563798b512e730721258535cd by KnightMiner
Add an option to create a direct field from a loader registry without mapping the type key

Would just use record loadable, but until I ditch IGenericLoader that causes a circular dependency. Will probably just ditch it before 1.19 is over with how much its getting in the way
The file was addedsrc/main/java/slimeknights/mantle/data/registry/MergingRegistryField.java
The file was modifiedsrc/main/java/slimeknights/mantle/data/registry/DirectRegistryField.java (diff)
The file was modifiedsrc/main/java/slimeknights/mantle/data/registry/GenericLoaderRegistry.java (diff)
Commit 6c01901264f4b28084ee5ccec20af17105bc7963 by KnightMiner
Make NamedComponentRegistry registration threadsafe

Also relax thread safety on IdAwareComponentRegistry to just register, no one should be registering things at a time when getting may happen
The file was modifiedsrc/main/java/slimeknights/mantle/data/registry/IdAwareComponentRegistry.java (diff)
The file was modifiedsrc/main/java/slimeknights/mantle/data/registry/NamedComponentRegistry.java (diff)