Skip to content

Commit

Permalink
Use thenCompose instead of thenApply for loot table provider
Browse files Browse the repository at this point in the history
  • Loading branch information
maityyy committed Mar 3, 2024
1 parent d20e1f0 commit 247c096
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static CompletableFuture<?> run(
HashMap<Identifier, LootTable> builders = Maps.newHashMap();
HashMap<Identifier, ConditionJsonProvider[]> conditionMap = new HashMap<>();

return registryLookup.thenApply(lookup -> {
return registryLookup.thenCompose(lookup -> {
provider.accept(lookup, (identifier, builder) -> {
ConditionJsonProvider[] conditions = FabricDataGenHelper.consumeConditions(builder);
conditionMap.put(identifier, conditions);
Expand Down

0 comments on commit 247c096

Please sign in to comment.