Fix derp with custom properties. They work now!

This commit is contained in:
Christian 2013-11-05 22:23:24 -05:00
parent 289678252b
commit 83d8713bea

View file

@ -498,13 +498,13 @@ public class FMLModContainer implements ModContainer
} }
} }
CustomProperty[] props = (CustomProperty[]) descriptor.get("customProperties"); List<Map<String,Object>> props = (List<Map<String, Object>>) descriptor.get("customProperties");
if (props!=null && props.length > 0) if (props != null)
{ {
com.google.common.collect.ImmutableMap.Builder<String, String> builder = ImmutableMap.<String,String>builder(); com.google.common.collect.ImmutableMap.Builder<String, String> builder = ImmutableMap.<String,String>builder();
for (CustomProperty p : props) for (Map<String, Object> p : props)
{ {
builder.put(p.k(),p.v()); builder.put((String)p.get("k"),(String)p.get("v"));
} }
customModProperties = builder.build(); customModProperties = builder.build();
} }