execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:netherite_sword",components:{"minecraft:custom_data":{2hand:tag}}}}] if data entity @s Item.components."minecraft:attribute_modifiers"[{id:"minecraft:-123321432456189101-73841"}] run function survivalplus:tools/reforge/2handnetherite
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:netherite_sword",components:{"minecraft:custom_data":{longsword:tag}}}}] if data entity @s Item.components."minecraft:attribute_modifiers"[{id:"minecraft:-123321432456189101-73841"}] run function survivalplus:tools/reforge/longnetherite
execute as @e[type=item,tag=!plussed,predicate=survivalplus:item/equipment/equipment] unless data entity @s Item.components."minecraft:attribute_modifiers" run function survivalplus:tools/reforge/baseattributes/sort
#execute as @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{replacehat:tag}}}}] run function survivalplus:tools/ability_hats/hatreplace
execute as @e[type=item,tag=!plussed,predicate=survivalplus:item/meal,predicate=survivalplus:item/cooked_meat] run tag @s add meal
#execute as @e[type=item,tag=!plussed,nbt={Item:{id:beetroot}}] run data modify entity @s Item.components."minecraft:on_consume_effects" set value [{type:apply_effects,effects:[{id:regeneration,duration:20}]}]
execute as @e[type=item,tag=!plussed,predicate=survivalplus:item/cooked_meat,tag=!meal] run tag @s add smokeable
execute as @e[type=item,tag=!plussed,predicate=survivalplus:item/cooked_meat,tag=!meal] run tag @s add honeyable
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{upgradekit:tag}}}}] run tag @s add upgradekit
execute as @e[type=item,tag=!plussed,tag=upgradekit] run tag @s add special
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{armorkit:tag}}}}] run tag @s add armorkit
execute as @e[type=item,tag=!plussed,tag=armorkit] run tag @s add special
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{reforgekey:tag}}}}] at @s unless entity @e[tag=reforgekey,distance=..1] run tag @s add reforgekey
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{depthmeter:tag}}}},predicate=!survivalplus:item/compass] at @s unless entity @s[tag=depthmeter,distance=..1] run tag @s add depthmeter
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:dragon_egg"}}] run data merge entity @s {Invulnerable:1b,Item:{components:{"minecraft:custom_data":{endkey:tag},can_place_on:[{blocks:"white_stained_glass"}],lore:[{"text":"It may hold greater importance","color":"yellow"},{"text":"than just a trophy...","italic":true,"color":"yellow"}]}}}
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:nether_star"}},predicate=!survivalplus:item/stars] unless data entity @s Thrower run data merge entity @s {Item:{components:{"minecraft:item_name":{"text":"Wither Star"},"minecraft:custom_data":{critstar:tag},lore:[{"text":"Chance to deal +100% damage","italic":false,"color":"gray"},{"text":"Negates Wither Effect","italic":false,"color":"gray"}]}}}
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1}},predicate=survivalplus:item/trinket] run tag @s add trinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{bloodbone:tag}}}}] run tag @s add bloodbonetrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{boom:tag}}}}] run tag @s add creepertrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{bezoar:tag}}}}] run tag @s add cspidertrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{luck:tag}}}}] run tag @s add foottrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{revive:tag}}}}] run tag @s add husktrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{dmgredtrinket:tag}}}}] run tag @s add icegemtrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{itemguard:tag}}}}] run tag @s add igolemtrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{meteorite:tag}}}}] run tag @s add meteortrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{glutton:tag}}}}] run tag @s add pigmantrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{slimearrows:tag}}}}] run tag @s add slimetrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{watertrinket:tag}}}}] run tag @s add watertrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{strongbrick:tag}}}}] run tag @s add wskeltrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{warmstone:tag}}}}] run tag @s add wstonetrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{luckycoin:tag}}}}] if data entity @s Thrower run tag @s add cointrinket
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{luckycoin:tag}}}}] at @s unless entity @e[tag=zombmerchant,distance=..3.5,tag=!cointrinket] if data entity @s Thrower run data merge entity @s {CustomName:{"text":"Flipping..."},CustomNameVisible:1b}
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{luckycoin:tag}}}}] at @s unless entity @e[tag=zombmerchant,distance=..3.5,tag=!cointrinket] if data entity @s Thrower run tag @s add special
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1}},predicate=survivalplus:item/torch] if data entity @s Thrower run tag @s add torch
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:spider_eye",count:1}}] if data entity @s Thrower run tag @s add bait
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:fermented_spider_eye",count:1}}] if data entity @s Thrower run tag @s add bait
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:fermented_spider_eye",count:1}}] if data entity @s Thrower run tag @s add goodbait
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:blaze_powder",count:1}}] run tag @s add firefuel
execute at @e[nbt={Item:{components:{"minecraft:custom_data":{customfish:tag}}}}] run function survivalplus:tools/customfish
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{xporb:tag}}}}] run function survivalplus:tools/turn2xp
execute at @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{killtrader:tag}}}}] run function survivalplus:merchants/kill
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{rabbitnote:tag}}}},predicate=survivalplus:underground,predicate=survivalplus:light/0] run function survivalplus:tools/trinkets/rabbitnote
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{dechant:tag}}}}] run tag @s add dechant
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{cursed:tag}}}}] if data entity @s Thrower run function survivalplus:tools/cursed/speak/sort
#execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{gianthead:tag}}}}] run function survivalplus:tools/ability_hats/gianthead
execute as @e[type=item,tag=!plussed,nbt={Item:{count:1,components:{"minecraft:custom_data":{spawnermod:tag}}}}] run tag @s add spawnermod
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:carrot",count:1}}] run tag @s add plantable
execute as @e[type=item,tag=!plussed,nbt={Item:{id:"minecraft:potato",count:1}}] run tag @s add plantable
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{wild:tag}}}}] run tag @s add wild_root

execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{delsentry:tag}}}}] run function survivalplus:tools/trap/delsentry
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{delballista:tag}}}}] run function survivalplus:tools/trap/ballista/del
execute as @e[type=item,tag=!plussed,nbt={Item:{components:{"minecraft:custom_data":{del:tag}}}}] run kill @s
execute as @e[type=item,tag=!plussed] run tag @s add plussed