Skip to content

Commit

Permalink
Merge branch 'master' into 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Sep 17, 2024
2 parents ec40009 + ae1f5cb commit 1fea55f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/net/frozenblock/lib/cape/api/CapeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public static boolean canPlayerUserCape(UUID uuid, @NotNull Cape cape) {
return Registry.register(FrozenRegistry.CAPE, id, new Cape(id, buildCapeTextureLocation(id), Optional.of(allowedPlayers)));
}

public static @NotNull Cape registerCapeWithWhitelist(ResourceLocation id, UUID... uuids) {
return Registry.register(FrozenRegistry.CAPE, id, new Cape(id, buildCapeTextureLocation(id), Optional.of(ImmutableList.copyOf(uuids))));
}

private static ResourceLocation buildCapeTextureLocation(@NotNull ResourceLocation cape) {
return ResourceLocation.tryBuild(cape.getNamespace(), "textures/cape/" + cape.getPath() + ".png");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ public static void init() {
allArray.addAll(composers);

CapeUtil.registerCapeWithWhitelist(FrozenSharedConstants.id("frozenblock"), allArray);
CapeUtil.registerCapeWithWhitelist(FrozenSharedConstants.id("very_blue_cape"), UUID.fromString("ccaa0664-8fd4-4176-96b4-eab6f8c75083")); // Alex
}
}
1 change: 1 addition & 0 deletions src/main/resources/assets/frozenlib/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"cape.frozenlib.none": "§cMissing value!",
"cape.frozenlib.dummy": "§cNone",
"cape.frozenlib.frozenblock": "FrozenBlock",
"cape.frozenlib.very_blue_cape": "Very Blue Cape",

"commands.wind.display.global.success": "The global wind is currently: %s, %s, %s.",
"commands.wind.display.pos.success": "The wind at %s, %s, %s currently: %s, %s, %s.",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1fea55f

Please sign in to comment.