Merge pull request #1461 from Azanor/master

Fix for biome weights under 10
This commit is contained in:
LexManos 2014-10-16 06:24:48 -07:00
commit 5aa313cf00
1 changed files with 2 additions and 4 deletions

View File

@ -96,7 +96,7 @@
} }
else else
{ {
@@ -101,4 +124,14 @@ @@ -101,4 +124,12 @@
return aint1; return aint1;
} }
@ -105,9 +105,7 @@
+ { + {
+ List<BiomeEntry> biomeList = biomes[type.ordinal()]; + List<BiomeEntry> biomeList = biomes[type.ordinal()];
+ int totalWeight = WeightedRandom.func_76272_a(biomeList); + int totalWeight = WeightedRandom.func_76272_a(biomeList);
+ int rand = func_75902_a(totalWeight / 10) * 10; + int weight = BiomeManager.isTypeListModded(type)?func_75902_a(totalWeight):func_75902_a(totalWeight / 10) * 10;
+ int weight = rand + (BiomeManager.isTypeListModded(type) ? func_75902_a(Math.min(10, totalWeight - rand)) : 0);
+
+ return (BiomeEntry)WeightedRandom.getItem(biomeList, weight); + return (BiomeEntry)WeightedRandom.getItem(biomeList, weight);
+ } + }
} }