I'm not exactly sure how to use reflection. I've tried looking it up but I haven't been able to find anything about the newer ObfuscationReflectionHelper in 1.16. I currently have this:
Field field = ObfuscationReflectionHelper.findField(ItemGroup.class, "iconItemStack");
field.set(ItemGroup.TAB_FOOD, new ItemStack(Items.COOKIE));
I have also tried replacing "iconItemStack" with "field_151245_t" but I'm still not sure how to do this.
EDIT: I'm getting the error:
IllegalAccessException – if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final