execute if score .map map = .1 map at @e[tag=eventsspawn,tag=map1] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map = .1 map at @e[tag=eventsspawn,tag=map1] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map = .2 map at @e[tag=eventsspawn,tag=map2] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map = .2 map at @e[tag=eventsspawn,tag=map2] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map = .3 map at @e[tag=eventsspawn,tag=map3] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map = .3 map at @e[tag=eventsspawn,tag=map3] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map matches 4 at @e[tag=eventsspawn,tag=map4] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map matches 4 at @e[tag=eventsspawn,tag=map4] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map matches 5 at @e[tag=eventsspawn,tag=map5] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map matches 5 at @e[tag=eventsspawn,tag=map5] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map matches 5 at @e[tag=eventsspawn,tag=map5] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map matches 5 at @e[tag=eventsspawn,tag=map5] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

execute if score .map map matches 6 at @e[tag=eventsspawn,tag=map6] run summon minecraft:interaction ~ ~-0.5 ~ {width:2.0f,height:2.0f,response:1b,Tags:["goldenegg"]}
execute if score .map map matches 6 at @e[tag=eventsspawn,tag=map6] run summon minecraft:item_display ~ ~0.5 ~ {Glowing:1b,teleport_duration:2,Tags:["goldenegg"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]},item:{id:"minecraft:white_dye",count:1}}

item replace entity @e[type=minecraft:item_display,tag=goldenegg] container.0 with minecraft:white_dye[minecraft:custom_model_data={floats:[2000.0f]}] 1

tellraw @a {"text":"A giant golden egg has appeared !","color":"gold","bold":false,"type":"text"}


schedule function cf:events/goldenegg/noegg 25s