From 46dfaa6d0c0c1d3892024faf15ed5b933e74a040 Mon Sep 17 00:00:00 2001 From: Azanor Date: Thu, 16 Oct 2014 11:25:04 +0200 Subject: [PATCH] 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 --- .../net/minecraft/world/gen/layer/GenLayerBiome.java.patch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch index 82aa2644d..deae9ef08 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch @@ -96,7 +96,7 @@ } else { -@@ -101,4 +124,14 @@ +@@ -101,4 +124,12 @@ return aint1; } @@ -105,9 +105,7 @@ + { + List biomeList = biomes[type.ordinal()]; + int totalWeight = WeightedRandom.func_76272_a(biomeList); -+ int rand = func_75902_a(totalWeight / 10) * 10; -+ int weight = rand + (BiomeManager.isTypeListModded(type) ? func_75902_a(Math.min(10, totalWeight - rand)) : 0); -+ ++ int weight = BiomeManager.isTypeListModded(type)?func_75902_a(totalWeight):func_75902_a(totalWeight / 10) * 10; + return (BiomeEntry)WeightedRandom.getItem(biomeList, weight); + } }