mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Merge pull request #2196 from Choonster/master
BiomeManager: Fix off-by-one errors
This commit is contained in:
commit
8b70d770d5
1 file changed
+2
-2
@@ -147,7 +147,7 @@ public class BiomeManager
|
||||
public static ImmutableList<BiomeEntry> getBiomes(BiomeType type)
|
||||
{
|
||||
int idx = type.ordinal();
|
||||
List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
|
||||
List<BiomeEntry> list = idx >= biomes.length ? null : biomes[idx];
|
||||
|
||||
return list != null ? ImmutableList.copyOf(list) : null;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ public class BiomeManager
|
||||
|
||||
if (ret.ordinal() >= biomes.length)
|
||||
{
|
||||
biomes = Arrays.copyOf(biomes, ret.ordinal());
|
||||
biomes = Arrays.copyOf(biomes, ret.ordinal() + 1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in new issue
Block a user