drinkable-xp/pack/data/drinkable_xp/function/bottle/thrown.mcfunction

12 lines
434 B
Mcfunction
Raw Permalink Normal View History

2024-08-31 20:19:54 +00:00
# stop the experience bottle from being thrown
execute as @e[type=experience_bottle] run kill @s
stopsound @s * entity.experience_bottle.throw
# add xp and give a bottle
xp add @s 7 points
execute at @s run playsound minecraft:entity.experience_orb.pickup player @p ~ ~ ~ 0.25
execute if score @s giveEmptyBottle matches 0 run give @s minecraft:glass_bottle
# reset the xpBottleThrow score
scoreboard players set @s xpBottleThrow 0