Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Bug: Divide by zero

PG85 opened this issue ยท 1 comments

commented

blockspider reported via Slack:

there's a couple places in the code, like ChunkProviderTC.java line 586, where there's a 2.0 plus the river height, which produces a zero to divide by
riverWeight = this.nearBiomeWeightArray[(nextX + this.maxSmoothRadius + (nextZ + this.maxSmoothRadius) * this.maxSmoothDiameter)] / (nextRiverHeight + 2.0F);
in TerrainControl
same deal as what happens with BiomeHeight
biomeWeight = this.nearBiomeWeightArray[(nextX + this.maxSmoothRadius + (nextZ + this.maxSmoothRadius) * this.maxSmoothDiameter)] / (nextBiomeHeight + 2.0F); line 511

commented

Hasn't caused problems so far, also not sure what the actual/desired outcome would be in case of a problem. Added todo in the code.