-
Bug
-
Resolution: Fixed
-
Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w09a, Minecraft 18w14b, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre8, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, 1.14.4
-
Confirmed
-
Survival
-
(Unassigned)
The bug
The advancement trigger consume_item is not working for single potion item stacks when consumed in Survival or Adventure mode.
How to reproduce
- Download the attached data pack MC-120558 data pack.zip and place it in the datapacks folder of your world
- Open the world and drink any potion in Survival mode
→ The advancement is not granted - Drink any potion in Creative mode
→ The advancement is granted as expected
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.item.ItemPotion.onItemUseFinish(ItemStack, World, EntityLivingBase) reduces the stack size before applying the potion effects and testing advancement triggers. Therefore when the triggers are tested 0*potion (acting like 0*air) is compared.
Reducing the stack size should probably happen right before the glass bottle is added to the inventory.
- relates to
-
MC-190055 The block field of the location_check condition is checked after the block is destroyed
- Reopened
-
MC-117007 milk_bucket can't trigger consume_item of advancements
- Resolved
-
MC-189909 player_interacted_with_entity does not trigger if there is only one item and the item gets consumed
- Resolved