Jump to content

Konako

Members
  • Posts

    3
  • Joined

  • Last visited

Konako's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. What object do I have to pass in to access the field from in this instance?
  2. The SRG name you provided does the same error.
  3. Hi, I'm trying to receive the data from the tablist, most notably the footer and header. Here is the method I am using to obtain the private fields. I try to check for both the forge name and vanilla: private String getPrivateStringFieldFromObject(Object object, String forgeFieldName, String vanillaFieldName) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Field targetField = null; try { targetField = object.getClass().getDeclaredField(forgeFieldName); } catch (NoSuchFieldException e) { targetField = object.getClass().getDeclaredField(vanillaFieldName); } if (targetField != null) { targetField.setAccessible(true); return String.valueOf(targetField.get(object).toString()).toString(); } else { return ""; } } Here is the call that I use: getPrivateStringFieldFromObject(minecraft.ingameGUI.getTabList().getClass(), "footer", "field_175255_h") however I get java.lang.NoSuchFieldException after catching the first one. I don't see how I'm not getting the footer.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.