Suggestion: Event handlers for advancement and recipe unlocks
James103 opened this issue ยท 1 comments
I would like it if there were the following new event handlers, so Scarpet apps can do something when a player gains an advancement or unlocks a recipe for example, without having to check all recipes and advancements of all players every tick (which would be very computationally expensive).
-
__on_new_advancement(player, advancement, type)
(Called when a player makes an advancement.type
can be one ofnormal
,goal
, orchallenge
, whileadvancement
is the full advancement name (namespace:name). If the advancement is revoked on unlock from within its event handler, the toast does not show up.) -
__on_new_recipe(player, recipe, type)
(Called when a player unlocks a new recipe.type
refers to the where the recipe is crafted (crafting table, furnace, smoker, campfire, stonecutter, etc), whilerecipe
refers to the full recipe name (namespace:name). If the recipe is revoked on unlock from within its event handler, the toast does not show up.)