It is well known that the dragon egg spawns only ones on top of the end exit portal. That makes this egg at the moment really rare on multiplayer servers. A while ago the idea came to create a data pack that will make it possible for players to spawn a dragon egg on top of the exit portal when they kill the dragon for the first time.
While deloping my goal was to make this data pack as efficiently as possible. Because of the end generation, the end portal will spawn at X=0 and Z=0, only the Y is variable. To avoid unnecessarily check for the Highest blocks the Y value of 40 exit portals from manually generated worlds is noted to get the average Y-value.
With these results, the variation between results is calculated as the "standard deviation" of a data set (Stdev.s).
The average highest block with the Stdev.S is used to get the range where the highest block in most of the cases should be.
When the range of Y values is between 3 times lower - and 3 times higher than the average Y value the confidence interval will be greater than 99%.
The highest blocks of each portal are visible in i.o.d. this graph. The ranges of between the reliability are visualised.
This is between the yellow, orange and red lines the reliability is 68%, 95% and >99%.
Currently, it is good to know that this is currently a development version, The current data is from Minecraft 1.13.2 worlds and before 1.14 is released this research would be repeated to check everything is the same. Also, this Pack will NOT work on 1.13.2 due to Minecraft Issues.
IMPORTANT: This is NOT tested on custom End Dimensions and it is NOT sure if this will always work in End Dimensions.