mojira.dev
MC-260148

show_notification only works for shaped crafting recipes

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

Can confirm in 1.19.4-pre1. To reproduce:

  1. 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.

  2. Put a clay ball in your inventory.

  3. Notice that the brick smelting recipe shows as a notification, but the clay block crafting recipe does not. Neither recipe should show.

Can confirm in 24w09a

I can confirm this issue is still present in 1.20.5

Yep issue is also still present for me in 1.20.5

Wait, how does show_notitication in the recipe files affect / compare to show_toast in the advancement recipe files?

Advancement recipe files are just normal advancements without a display. There's no advancement types.

Misode

(Unassigned)

Confirmed

Platform

Normal

Crafting, Data Packs, UI

23w07a, 1.19.4 Pre-release 1, 1.20, 1.20.5, 1.21.1, 24w40a

Retrieved