I'm posting this here because MC Forums are down and peeps here seem pretty smart, so here's hopin'~
My command block contraption is meant to allow players to drain their XP into bottles by throwing empty bottles onto an emerald block.
Repeating command block:
Code:
execute as @e[type=minecraft:item, nbt={Item:{id:"minecraft:glass_bottle"}}] run execute if block ~ ~-1 ~ minecraft:emerald_block run summon minecraft:item ~ ~1 ~ {id:"experience_bottle",Count:1b}
Then that is chained to:
Code:
execute as @e[type=minecraft:item, nbt={item:{id:"minecraft:experience_bottle"},Count:1b}] run xp add @p -7 points
and
Code:
kill @e[type=minecraft:item, nbt={item:{id:"minecraft:glass_bottle"},Count:1b}]
I've tested each bit individually, and the only commands that seem to work are the one that subtracts the experience from the player, and the one that deletes the empty bottle. What am I doing wrong?