function cf:events/goldenegg/shake

scoreboard players add .state goldenegg 1

execute if score .state goldenegg matches 10 run item replace entity @e[type=minecraft:item_display,tag=goldenegg] container.0 with minecraft:white_dye[minecraft:custom_model_data={floats:[2001.0f]}] 1
execute if score .state goldenegg matches 20 run item replace entity @e[type=minecraft:item_display,tag=goldenegg] container.0 with minecraft:white_dye[minecraft:custom_model_data={floats:[2002.0f]}] 1
execute if score .state goldenegg matches 30 run item replace entity @e[type=minecraft:item_display,tag=goldenegg] container.0 with minecraft:white_dye[minecraft:custom_model_data={floats:[2003.0f]}] 1

execute at @e[type=minecraft:interaction,tag=goldenegg] if score .state goldenegg matches 40 run function cf:events/goldenegg/open
