The block field of the location_check condition is checked after the block is destroyed
The block field of the location_check condition in a block loot table is checked after the block is destroyed.
To Reproduce
- Create the following loot table in a data pack under data/minecraft/loot_tables/blocks/stone.json, or download the datapack MC-190055 data pack.zip
:
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:stone", "conditions": [ { "condition": "minecraft:location_check", "predicate": { "block": { "block": "minecraft:stone" } } } ] } ] } ] } - Go to survival mode and mine a stone block.
No block is dropped.
- Change the "block": "minecraft:stone" part to "block": "minecraft:air"
A stone item is dropped.
The condition is checked after the block is destroyed, making it impossible to check the NBT data of the destroyed block in block loot tables.
Created Issue:
The block field of the location_check condition is checked after the block is destroyed
The block field of the location_check condition in a block loot table is checked after the block is destroyed.
To Reproduce
- Create the following loot table in a data pack under data/minecraft/loot_tables/blocks/stone.json:
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:stone", "conditions": [ { "condition": "minecraft:location_check", "predicate": { "block": { "block": "minecraft:stone" } } } ] } ] } ] }- Go to survival mode and mine a stone block.
No block is dropped.
- Change the "block": "minecraft:stone" part to "block": "minecraft:air"
A stone item is dropped.
The condition is checked after the block is destroyed, making it impossible to check the NBT data of the destroyed block in block loot tables.
The block field of the location_check condition in a block loot table is checked after the block is destroyed.
To Reproduce
- Create the following loot table in a data pack under data/minecraft/loot_tables/blocks/stone.json, or download the datapack MC-190055 data pack.zip
:
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:stone", "conditions": [ { "condition": "minecraft:location_check", "predicate": { "block": { "block": "minecraft:stone" } } } ] } ] } ] }- Go to survival mode and mine a stone block.
No block is dropped.
- Change the "block": "minecraft:stone" part to "block": "minecraft:air"
A stone item is dropped.
The condition is checked after the block is destroyed, making it impossible to check the NBT data of the destroyed block in block loot tables.
Can confirm in 1.17
Can confirm in 1.18.1.
Can confirm in 22w13a.
Can confirm in 1.19.2.