Skip to content

Commit

Permalink
Origins: Fix EdwinMindcraft/calio#4.
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug committed Mar 13, 2024
1 parent 5155189 commit 1d49299
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Builder powers(JsonArray powers) throws JsonParseException {

@Contract("_ -> this")
public Builder powers(Iterable<ResourceLocation> powers) {
Registry<ConfiguredPower<?, ?>> registry = ApoliAPI.getPowers(ServerLifecycleHooks.getCurrentServer() != null ? ServerLifecycleHooks.getCurrentServer().registryAccess() : RegistryAccess.BUILTIN.get());
Registry<ConfiguredPower<?, ?>> registry = ApoliAPI.getPowers(ServerLifecycleHooks.getCurrentServer() != null ? ServerLifecycleHooks.getCurrentServer().registryAccess() : null);
List<ResourceKey<ConfiguredPower<?, ?>>> keys = Streams.stream(powers).map(loc -> ResourceKey.create(ApoliDynamicRegistries.CONFIGURED_POWER_KEY, loc)).toList();
this.powers.add(HolderSet.direct(registry::getOrCreateHolderOrThrow, keys));
return this;
Expand Down

0 comments on commit 1d49299

Please sign in to comment.