execute as @e[type=minecraft:item_display,tag=spawnegg,limit=1] at @s run tp @s ~ ~ ~ 25 0
schedule function cf:interaction/spawnegg/shake2 2t
playsound minecraft:entity.turtle.egg_crack ambient @a ~ ~ ~ 5


scoreboard players add .state2 goldenegg 1
execute if score .state2 goldenegg matches 0 run item replace entity @e[type=minecraft:item_display,tag=spawnegg] container.0 with minecraft:white_dye[minecraft:custom_model_data={floats:[2000.0f]}] 1

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

execute at @e[type=minecraft:interaction,tag=spawnegg] if score .state2 goldenegg matches 4 run function cf:interaction/spawnegg/open
