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