Mojira Archive
MC-97813

Old strongholds "change position" and distance to origin is too high

Strongholds that generated in 1.8 won't generate in the same position in 1.9pre2.
Also they generate at least 1408 blocks away from origin (in 1.8 it was 640 blocks).
This was a side effect of the fix for MC-92289 which changed the distance calculation of strongholds.

How it was

Strongholds plotted for 1.8 (just the inner circle/triangle) and 16w05b (just adds extra circles)¹

Distance calculation for 1.8 and 16w05b:

MapGenStronghold.java
double distance = (1.25D * (double) circle + rand.nextDouble()) * this.const32 * (double) circle;

How it currently is

Strongholds plotted for 1.8 and 1.9pre2 (notice how it loses the old inner circle)¹

1.9pre2:

MapGenStronghold.java
double distance = 4.0D * this.const32 + this.const32 * (double)circle * 6.0D + (rand.nextDouble() - 0.5D) * this.const32 * 2.5D;

Adjusted

Stronghold plotted for 1.8 and an adjusted version to keep the inner circle the same¹

MapGenStronghold.java
double distance = 1.75D * this.const32 + this.const32 * (double)circle * 6.0D + (rand.nextDouble() - 0.5D) * this.const32 * (circle == 0 ? 1.0D : 2.5D);

It would be preferable if the old stronghold positions would remain the same.
Also the increased distance to origin and therefore also to spawn has the disadvantage of longer walkways when cycling between the end and the over world.
In 1.8 the inner circle was between 640 and 1152 blocks from origin.
In 1.9pre2 the inner circle lies between 1408 and 2048 blocks from origin.
With the random placement of the spawn point it wouldn't be uncommon to have distances of several thousand blocks to the first accessible end portal.
As the end is a major component of the game (especially in 1.9) it shouldn't be that far away from the world center.

@edit It turns out eye of enders also behave weird when it comes to the strongholds that were generated in 1.8 (when you upgrade a world to 1.9pre2).
It still is affected by the old stronghold but misses the portal room by some chunks.

Other alternatives:

Increasing spread and increasing interval (Pretty much 16w05b with the fix of MC-92289)

MapGenStronghold.java
double distance = (1.25D * ((double) circle + 1.0) + rand.nextDouble()) * this.const32 * (double) (circle / 1.9 + 1.0);

Constant spread and constant interval

MapGenStronghold.java
double distance = 1.75D * this.const32 + this.const32 * (double)circle * 6.0D + (rand.nextDouble() - 0.5D) * this.const32;

Increasing spread and constant interval

MapGenStronghold.java
double distance = 1.75D * this.const32 + this.const32 * (double)circle * 6.0D + (rand.nextDouble() - 0.5D) * this.const32 * (1.0 + circle / 1.75D);

Evenly distributed (has a rare chance of double strongholds though)

MapGenStronghold.java
double distance = 1.75D * this.const32 + this.const32 * (double)circle * 6.0D + (rand.nextDouble() - 0.5D) * this.const32 * (circle == 0 ? 1.0D : 6.0D);

1. The plots are the strongholds for 1000 seeds each.

Works As Intended

[Mojang] Panda

[Mojang] Searge (Michael Stoyke)

2016-02-22, 02:45 AM

2020-08-06, 01:41 PM

2016-02-23, 04:27 PM

17

16

Unconfirmed

Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2

Minecraft 1.9 Pre-Release 3