Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/data/pskeep2/function/die.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ advancement revoke @s only ~/
clear @s *[enchantments~[{enchantments:vanishing_curse}]]
# store items before and after clearing
data modify storage pskeep2:main items.all set from entity @s Inventory

#Check for equipment in newer versions
execute if data entity @s equipment if items entity @s weapon.offhand #pskeep2:drop run data modify storage pskeep2:main items.all append from entity @s equipment.offhand
clear @s #pskeep2:drop
data modify storage pskeep2:main items.left set from entity @s Inventory

Expand Down Expand Up @@ -69,7 +72,7 @@ execute function ~/drop_xp:
scoreboard players operation .xp pskeep2 += #level_squared pskeep2
store result storage pskeep2:main drop.xp int 1 scoreboard players operation .xp pskeep2 += .points pskeep2
# drop xp orb
function pskeep2:drop/xp with storage pskeep2:main drop
execute if score .xp pskeep2 matches 1.. run function pskeep2:drop/xp with storage pskeep2:main drop
# reset player xp
xp set @s 0 levels
xp set @s 0 points
Loading