diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-06-25 22:36:47 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-06-28 03:21:12 +0800 |
| commit | 14255a174bb5e55df48823a5ca29c20700d1f673 (patch) | |
| tree | 98d86f29cc5d2f3a9c563fa7fd1d2292930f3c54 | |
| parent | b9b450cb3c024952a2748fbcfb83726d061964de (diff) | |
| download | RoughlyEnoughItems-14255a174bb5e55df48823a5ca29c20700d1f673.tar.gz RoughlyEnoughItems-14255a174bb5e55df48823a5ca29c20700d1f673.tar.bz2 RoughlyEnoughItems-14255a174bb5e55df48823a5ca29c20700d1f673.zip | |
Detect unbound categories
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java index ed7c722d6..af84abe0f 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java @@ -260,6 +260,12 @@ public class DisplayRegistryImpl extends RecipeManagerContextImpl<REIClientPlugi addWithReason(recipe, DisplayAdditionReason.RECIPE_MANAGER); } } + + for (CategoryIdentifier<?> identifier : displays.keySet()) { + if (CategoryRegistry.getInstance().tryGet(identifier).isEmpty()) { + RoughlyEnoughItemsCore.LOGGER.throwException(new IllegalStateException("Displays registered for unknown registry: " + identifier)); + } + } } @Override |
