title: How do I use field.get(obj) on a List field?
body: <p>I want to get a private List field from a class, but I don't know what argument to give to field.get to successfully get the List from the class. My current code produces a java.lang.IllegalArgumentException.</p>
  
  <pre><code>Field field = Minecraft.class.getDeclaredField("defaultResourcePacks");
  field.setAccessible(true);
  
  List&lt;IResourcePack&gt; changedList = new ArrayList&lt;IResourcePack&gt;();
  
  List&lt;IResourcePack&gt; list = (List&lt;IResourcePack&gt;) field.get(changedList);
  </code></pre>