fix new custom tags entries not being considered in unification

This commit is contained in:
rlnt 2024-10-22 13:57:20 +02:00
parent 84fcb8046d
commit 9769c25a1c
No known key found for this signature in database
2 changed files with 9 additions and 7 deletions

View file

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning].
## Unreleased
- fixed crash when runtime isn't loaded ([#101](https://github.com/AlmostReliable/almostunified/issues/101))
- fixed newly created custom tags not being considered for unification
## [1.2.0] - 2024-10-06

View file

@ -76,12 +76,7 @@ public final class AlmostUnifiedRuntimeImpl implements AlmostUnifiedRuntime {
var tagConfig = Config.load(TagConfig.NAME, TagConfig.SERIALIZER);
var unificationConfigs = UnificationConfig.safeLoadConfigs();
var unificationTags = bakeAndValidateTags(
unificationConfigs,
itemTags,
placeholderConfig,
debugConfig.shouldLogInvalidTags()
);
TagReloadHandler.applyCustomTags(tagConfig.getCustomTags(), itemTags);
CustomIngredientUnifierRegistry ingredientUnifierRegistry = new CustomIngredientUnifierRegistryImpl();
PluginManager.instance().registerCustomIngredientUnifiers(ingredientUnifierRegistry);
@ -89,7 +84,13 @@ public final class AlmostUnifiedRuntimeImpl implements AlmostUnifiedRuntime {
PluginManager.instance().registerRecipeUnifiers(recipeUnifierRegistry);
// TODO: add plugin support for registering config defaults
TagReloadHandler.applyCustomTags(tagConfig.getCustomTags(), itemTags);
var unificationTags = bakeAndValidateTags(
unificationConfigs,
itemTags,
placeholderConfig,
debugConfig.shouldLogInvalidTags()
);
TagSubstitutionsImpl tagSubstitutions = TagSubstitutionsImpl.create(
itemTags::has,
unificationTags::contains,