Merge pull request #1461 from Azanor/master
Fix for biome weights under 10
This commit is contained in:
commit
5aa313cf00
|
@ -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);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue