Fix for biome weights under 10

This solves the problem where custom mod biomes with weights under 10
not being generated in the world.

Cleaned up the code and made the patch smaller
Merge pull request #1461 from Azanor/master

 Fix for biome weights under 10