From 09dd117d1d0f1d4cfdab84f24ad2b115a562d973 Mon Sep 17 00:00:00 2001 From: Azanor Date: Fri, 19 Apr 2013 14:08:53 +0300 Subject: [PATCH] Fix for ClassCastException when attempting to fetch Biome types from BiomeDictionary Attempting to fetch the BiomeDictionary types linked to a biome throws a ClassCastException. This fixes that --- common/net/minecraftforge/common/BiomeDictionary.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/net/minecraftforge/common/BiomeDictionary.java b/common/net/minecraftforge/common/BiomeDictionary.java index 3703a58255..8339b357f0 100644 --- a/common/net/minecraftforge/common/BiomeDictionary.java +++ b/common/net/minecraftforge/common/BiomeDictionary.java @@ -116,7 +116,7 @@ public class BiomeDictionary if(biomeList[biome.biomeID] != null) { - return (Type[])biomeList[biome.biomeID].typeList.toArray(); + return (Type[])biomeList[biome.biomeID].typeList.toArray(new Type[0]); } return new Type[0]; @@ -298,4 +298,4 @@ public class BiomeDictionary registerBiomeType(extremeHillsEdge, MOUNTAIN ); registerBiomeType(mushroomIslandShore, MUSHROOM, BEACH); } -} \ No newline at end of file +}