
# -> Get count
execute store result score @s OverlyRealistic.General.ArbitraryData run \
    data get entity @s Item.count

# -> If count is not higher than max then return and modify item
execute unless score @s OverlyRealistic.General.ArbitraryData matches 9.. run \
    return run \
        item modify entity @s contents overly_realistic:item_edit/weighted_block_2

# -> Set max stack
data modify entity @s Item.count set value 8

# -> Set max stack size
item modify entity @s contents overly_realistic:item_edit/weighted_block_2
