mojira.dev
MC-249935

New advancement "Birthday Song" grants no experience

Relates to MC-249782. The new advancement "Birthday Song" is designated as a challenge advancement (the ones with the sound effect with audible experience) but it grants no experience. This is inconsistant with all other challenge advancements, and is an oversight. The bug is either that these advancements shouldn't be challenges, or that they should grant experience.

Steps to Reproduce:

/advancement grant @s only minecraft:husbandry/allay_deliver_cake_to_note_block

Attachments

Comments 4

I can confirm this behavior in 1.19 Pre-release 3. Here's a code analysis regarding this issue.

Code Analysis:

The following is based on a decompiled version of Minecraft 1.19 Pre-release 3 using Mojang mappings.

net.minecraft.data.advancements.HusbandryAdvancements.java

public class HusbandryAdvancements implements Consumer<Consumer<Advancement>> {
   ...
   @Override
   public void accept(Consumer<Advancement> consumer) {
      ...
      Advancement.Builder.advancement().parent(advancement12).display(Items.NOTE_BLOCK, (Component)Component.translatable("advancements.husbandry.allay_deliver_cake_to_note_block.title"), (Component)Component.translatable("advancements.husbandry.allay_deliver_cake_to_note_block.description"), null, FrameType.CHALLENGE, true, true, true).addCriterion("allay_deliver_cake_to_note_block", ItemInteractWithBlockTrigger.TriggerInstance.allayDropItemOnBlock(LocationPredicate.Builder.location().setBlock(BlockPredicate.Builder.block().of(Blocks.NOTE_BLOCK).build()), ItemPredicate.Builder.item().of(Items.CAKE))).save(consumer, "husbandry/allay_deliver_cake_to_note_block");
      ...

If we look at the above class, we can see that the rewards() method (a method responsible for awarding experience to the player upon completing an advancement) is never called throughout this piece of code for the "Birthday Song" advancement, resulting in this advancement granting no experience upon being completed.

Can confirm in 1.19.

Can confirm in 1.19.1. You can reproduce this by executing the command provided below and observing how you're not awarded with any experience upon doing so.

/advancement grant @s only minecraft:husbandry/allay_deliver_cake_to_note_block

Can confirm in 1.19.2.

SeaOfPixels

v-armanv

Confirmed

Low

Advancements

22w14a, 22w15a, 22w17a, 22w19a, 1.19 Pre-release 3, 1.19, 1.19.1, 1.19.2

22w42a

Retrieved