Jump to content

ObfuscationReflectionHelper doesn't work on the client side of LAN connected players


Recommended Posts

Posted (edited)

I'm constantly getting this error: 

The game crashed whilst unexpected error
Error: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: renderPosX

 

whenever I use ObfuscationReflectionHelper on the client (in several, unrelated classes).

 

I do not get this error on the client side of the world host, either, and the reflection always go through properly. Any ideas why it doesn't work in the specific case of a player connecting to the world and trying to do the reflection?

 

The fields in question were EntityArrow.inGround, and RenderManager.renderPosX. I had written off EntityArrow as something stupid with Arrows but then it happened again with the RenderManager.. the fields definitely exist, and both writes and reads fail.

 

Edit: Tried debugging it with no luck.. I was connecting from Twitch -> Debug when I got the error, but going from Debug -> Twitch didnt throw this error.. So not sure what that means

Edited by stepsword
Posted (edited)
9 hours ago, diesieben07 said:

You need to specify the SRG name when using ObfuscationReflectionHelper for it to work outside the development environment.

OH. That explains a lot, thank you. I remember when I initially made that field, I saw someone else's code do p_12345 or something, but I assumed it was just patched to have the correct name in a later version of Forge.  Do you happen to know how I can find the actual name of the variable I'm looking for? i.e. the original class before de-obfuscation?

Edited by stepsword
Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
2 minutes ago, stepsword said:

Thanks for this - do you happen to know if 1.12 is sufficient for 1.12.2? I don't see any 1.12.2 on that site.

Should be, haven't looked at it in a while.

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
59 minutes ago, Draco18s said:

Should be, haven't looked at it in a while.

Thanks - it looks like the latest snapshot has mostly the same mappings as the oldest snapshot so I guess it's the same throughout

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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