
# -> This is jank AS FUCK

# -> Inventory changes
execute if items entity @s inventory.0 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_0
execute if items entity @s inventory.1 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_1
execute if items entity @s inventory.2 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_2
execute if items entity @s inventory.3 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_3
execute if items entity @s inventory.4 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_4
execute if items entity @s inventory.5 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_5
execute if items entity @s inventory.6 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_6
execute if items entity @s inventory.7 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_7
execute if items entity @s inventory.8 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_8

# -> If item has already been edited then return
execute unless items entity @s inventory.* *[!custom_data] run \
    return fail

# -> Continue with inventory changes
execute if items entity @s inventory.9 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_9
execute if items entity @s inventory.10 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_10
execute if items entity @s inventory.11 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_11
execute if items entity @s inventory.12 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_12
execute if items entity @s inventory.13 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_13
execute if items entity @s inventory.14 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_14
execute if items entity @s inventory.15 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_15
execute if items entity @s inventory.16 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_16
execute if items entity @s inventory.17 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_17

# -> If item has already been edited then return
execute unless items entity @s inventory.* *[!custom_data] run \
    return fail

# -> Continue with inventory changes
execute if items entity @s inventory.18 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_18
execute if items entity @s inventory.19 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_19
execute if items entity @s inventory.21 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_21
execute if items entity @s inventory.22 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_22
execute if items entity @s inventory.23 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_23
execute if items entity @s inventory.24 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_24
execute if items entity @s inventory.25 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_25
execute if items entity @s inventory.26 *[!custom_data] run function overly_realistic:general/items/player/inv_slots/inventory/edit_inv_26
