
# -> Create contents
summon minecraft:item_display ~ ~ ~ {Tags:["OverlyRealistic.Block.Composter_Contents","OverlyRealistic.Block.Composter_TempContents"],item: {components: {"minecraft:item_model": "overlyrealistic:blocks/composter_contents"}, count: 1, id: "minecraft:copper_block"}, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [1.0f, 1.0f, 1.0f], translation: [0.0f, -0.5f, 0.0f]}, interpolation_duration:20, start_interpolation:-1}

# -> Attach contents
execute align xyz run \
    ride @n[type=item_display,tag=OverlyRealistic.Block.Composter_TempContents,dx=0,dy=0,dz=0] mount @s

# -> Edit contents
execute on passengers \
    if entity @s[tag=OverlyRealistic.Block.Composter_TempContents] run \
        function overly_realistic:general/custom_blocks/composter/composter_interact/compost_contents/contents_edit

# -> Set defining value
scoreboard players set @s OverlyRealistic.World.ComposterItemAdd_Defining -50

# -> Tag composter
tag @s add OverlyRealistic.Block.Composter_HasContents