[1.21.1] ModLoading cleanup and optimisations (#10052)

This commit is contained in:
Paint_Ninja authored and GitHub committed 2024-08-16 22:49:11 +01:00
1 parent f106ff0c21
commit 9714512c31
101 files changed
+837 -841

No files matched your search

@@ -221,16 +221,13 @@ public class ObjectHolderRegistry
public static void applyObjectHolders(Predicate<ResourceLocation> filter)
{
RuntimeException aggregate = new RuntimeException("Failed to apply some object holders, see suppressed exceptions for details");
objectHolders.forEach(objectHolder -> {
try
{
for (Consumer<Predicate<ResourceLocation>> objectHolder : objectHolders) {
try {
objectHolder.accept(filter);
}
catch (Exception e)
{
} catch (Exception e) {
aggregate.addSuppressed(e);
}
});
}
if (aggregate.getSuppressed().length > 0)
{