Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Sep 19, 2024
1 parent 74458e7 commit 74dff49
Show file tree
Hide file tree
Showing 2 changed files with 8 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 @@ -74,6 +74,10 @@ public static boolean canPlayerUserCape(UUID uuid, @NotNull Cape cape) {
return cape.allowedPlayers().map(uuids -> uuids.contains(uuid)).orElse(true);
}

public static void registerCape(ResourceLocation id, ResourceLocation textureId, Component capeName) {
CAPES.put(id, new Cape(id, capeName, textureId, Optional.empty()));
}

public static void registerCape(ResourceLocation id, Component capeName) {
CAPES.put(id, new Cape(id, capeName, buildCapeTextureLocation(id), Optional.empty()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.frozenblock.lib.FrozenSharedConstants;
import net.frozenblock.lib.cape.api.CapeUtil;
import net.frozenblock.lib.cape.impl.networking.CapeCustomizePacket;
import net.frozenblock.lib.cape.impl.networking.LoadCapeRepoPacket;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;

public class ServerCapeData {
Expand All @@ -50,6 +52,8 @@ public static void init() {
}
});

CapeUtil.registerCape(FrozenSharedConstants.id("dummy"), null, Component.translatable("cape.frozenlib.dummy"));

// FrozenBlock
List<UUID> devs = ImmutableList.of(
UUID.fromString("097b76e8-ac32-410f-b81c-38dd4086b97c"), // Lunade
Expand Down

0 comments on commit 74dff49

Please sign in to comment.