Skip to content

Commit 74dff49

Browse files
fix
1 parent 74458e7 commit 74dff49

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/net/frozenblock/lib/cape/api/CapeUtil.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public static boolean canPlayerUserCape(UUID uuid, @NotNull Cape cape) {
7474
return cape.allowedPlayers().map(uuids -> uuids.contains(uuid)).orElse(true);
7575
}
7676

77+
public static void registerCape(ResourceLocation id, ResourceLocation textureId, Component capeName) {
78+
CAPES.put(id, new Cape(id, capeName, textureId, Optional.empty()));
79+
}
80+
7781
public static void registerCape(ResourceLocation id, Component capeName) {
7882
CAPES.put(id, new Cape(id, capeName, buildCapeTextureLocation(id), Optional.empty()));
7983
}

src/main/java/net/frozenblock/lib/cape/impl/ServerCapeData.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
2727
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
2828
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
29+
import net.frozenblock.lib.FrozenSharedConstants;
2930
import net.frozenblock.lib.cape.api.CapeUtil;
3031
import net.frozenblock.lib.cape.impl.networking.CapeCustomizePacket;
3132
import net.frozenblock.lib.cape.impl.networking.LoadCapeRepoPacket;
33+
import net.minecraft.network.chat.Component;
3234
import net.minecraft.server.level.ServerPlayer;
3335

3436
public class ServerCapeData {
@@ -50,6 +52,8 @@ public static void init() {
5052
}
5153
});
5254

55+
CapeUtil.registerCape(FrozenSharedConstants.id("dummy"), null, Component.translatable("cape.frozenlib.dummy"));
56+
5357
// FrozenBlock
5458
List<UUID> devs = ImmutableList.of(
5559
UUID.fromString("097b76e8-ac32-410f-b81c-38dd4086b97c"), // Lunade

0 commit comments

Comments
 (0)