You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
GamerCoder edited this page May 22, 2023
·
2 revisions
Minecraft has a built-in method of adding rewards for completing Advancements.
Advancementa1 = ...
// Represents an empty rewarda1.setReward(AReward.EMPTY);
// Will grant the player 20 experience points upon advancement completionARewardr1 = newAReward(20);
a1.setReward(r1);
// Will grant the player 30 experience points and give them any items from the specified keys of the loot tableARewardr2 = newAReward(30, Set.of(LootTables.WOLF.getKey());
a1.setReward(r2);
// Will grant the player 35 experience points and make any recipes with the matching keys visible and usableARewardr3 = newAReward(35, Set.of(), Set.of(NamespacedKey.minecraft("myrecipekey"));
a1.setReward(r3);