Skip to content

For mods

Trophy kinds (for mods)

A mod gives trophies for its own achievements by registering a kind, from its mod constructor, on both sides:

TrophyKinds.register(Identifier.fromNamespaceAndPath("mymod", "quest"), new TrophyKind() {
    public Component name(Identifier subject, boolean client) { return Quests.name(subject); }
    public ItemStack icon(Identifier subject, boolean client) { return Quests.icon(subject); }
    public @Nullable PedestalRarity rarity(Identifier subject) { return PedestalRarities.EPIC; } // optional
});
ItemStack trophy = TrophyPedestals.create(kind, questId, PedestalRecord.Unlocker.PLAYER, player.getName().getString());
TrophyPedestals.give(player, List.of(trophy));

name and icon are asked on the client every frame a trophy is drawn (client true) and on the server when the item is made (client false), so keep them cheap; color (white by default) colors the name on the text frame. TrophyPedestals also has create(pedestal, kind, subject, unlocker, name, at, rarity), defaultPedestal(), pedestal(id), record(stack), mobRecord(stack), rarity(stack) and createMob(...); all in net.ixdarklord.trophypedestals.api.

A pedestal's Team access asks PedestalTeams whether two players share a team: scoreboard teams by default. A mod with teams of its own sets another source with PedestalTeams.setSource, so its teams count.