mojira.dev

Ryan Michela

Assigned

No issues.

Reported

MC-33587 Null Pointer Exception Duplicate

Comments

This is a literal one line fix. Detailed description can be found at http://www.minecraftforum.net/forums/minecraft-discussion/discussion/2393260-customized-settings-for-amplified

The problem is in ChunkProviderGenerate.java

Your code should look similar to this:

float minHeight = this.customizedSettings.biomeDepthOffset + var17.minHeight * this.customizedSettings.biomeDepthWeight;
float maxHeight = this.customizedSettings.biomeScaleOffset + var17.maxHeight * this.customizedSettings.biomeScaleWeight;

// Begin fix
if (minHeight < -1.8) minHeight = -1.8; // -1.8 is the lowest natural biome minHeight for the generic overworld
// End fix

if (this.worldType == WorldType.AMPLIFIED && minHeight > 0.0F)
{
    minHeight = 1.0F + var18 * 2.0F;
    maxHeight = 1.0F + var19 * 4.0F;
}

// When the divisor goes negative, the sign of this equation inverts, causing spikes.
float var20 = this.parabolicField[var15 + 2 + (var16 + 2) * 5] / (minHeight + 2.0F);