The show_notification
is supposed to determines if a notification is shown for recipes, but it is only supported for the crafting_shaped
recipe serializer. For all other recipes it always shows the notification.
Code Analysis
The Recipe
class has a default implementation for showNotification
, returning true
. Only ShapedRecipe
actually overwrites this method and implements parsing show_notification
from json.
Comments 6
Wait, how does show_notitication in the recipe files affect / compare to show_toast in the advancement recipe files?
Can confirm in 1.19.4-pre1. To reproduce:
Create a new world with the attached datapack installed. The datapack adds
"show_notification": false
to the clay ball --> brick smelting recipe and the clay ball --> clay crafting recipe.Put a clay ball in your inventory.
Notice that the brick smelting recipe shows as a notification, but the clay block crafting recipe does not. Neither recipe should show.