You could use ObfuscationReflectionHelper. All you need is to get your hands on the GuiIngameForge instance.
I looked and it seems like they're setting a field called rayTraceBlock and rayTraceFluid. A grep in ~/.gradle/caches/forge_gradle reveals that the names of those fields are "field_211537_g" and "field_211538_h" respectively.
An example of setting one of the fields:
ObfuscationReflectionHelper.setPrivateValue(GuiIngameForge.class, guiIngameForge, entity.rayTrace(20.0D, 0.0F, RayTraceFluidMode.NEVER), "field_211537_g");
I'm not sure how you can get an instance of GuiIngameForge, but Minecraft.getInstance().ingameGUI gives you an instance of GuiIngame, which GuiIngameForge extends.