PaperMC/paper-server/patches
David Slovikosky c637868aef Fix missing chunks due to integer overflow
This patch fixes a bug in the EndIslandDensityFunction class where the distance
from 0,0 squared overflows the maximum size of an integer. The overflow leads
to hard chunk borders around 370,000 blocks from 0,0. After this cutoff there
is a few hundred thousand block gap before end land resuming to generate at
530,000 blocks from spawn. This is due to the integer flipping back and forth.

The fix for the issue is quite simple, casting chunk coordinates to longs
allows the distance calculation to avoid overflow and work as intended.

This issue is being tracked in Mojira ticket MC-159283
2020-06-09 00:10:03 -07:00
..
sources Fix missing chunks due to integer overflow 2020-06-09 00:10:03 -07:00