Minecraftforge: [Suggestion] Eye height was made private, and doesn't show up in any of the csv files.

Created on 16 Feb 2019  路  10Comments  路  Source: MinecraftForge/MinecraftForge

Can we have it back, please? EntityPlayer#getEyeHeight() doesn't work for everything EntityPlayer#eyeheight worked for.

Edit: While we're at it, can we get ObfuscationReflectionHelper.findField() back too? That's apparently not visible anymore.

1.13 Regression

Most helpful comment

Yes, an eye height was exposed SPECIFICALLY for Morph, and we decided it would be better for mods such as that to have a cleaner/more obvious and documented API instead of a magic 'eyeHeight' field for suffocating.

Had I known Lex wanted me to go into the whole backstory
...
you need to explain and justify your request better

All 10 comments

Obf Reflection helper is not meant for end modder consumption. It will break horribly in J9. We can get away with it because Java thinks we are Minecraft.

As for the eye height, you need to explain and justify your request better. As getEyeHeight should be fine.

ReflectionHelper and its methods became deprecated in later versions for 1.12.2 in favour of ObfuscationReflectionHelper, I assumed the same was true for 1.13.

As for eye height, getEyeHeight doesn't work because we can't modify it. We did, at least, manage to find a way around it, though it's really sketchy imo.

Again, explain and justify your request better. Needing to modify it tells me nothing about why.
And making a field public with no tracking of changes or allowing entities to react to that change is a bad idea.

Was public before, and seemed just fine. The exact reason we need to mess with eye height is because of a library we were porting to 1.13. The library handles changing player and entity size using attributes, and automatically handles eye height and rendering for modders. That's what why we needed it.

That can be accomplished client side with the camera setup events.
And it was public before for one specific reason. And that reason no longer applies so it's no longer public.
If you need it, justify it better. Or look into alternative approaches for your use case. Shotgun approaches are not good ways to do things.

...I don't think you understood what I was saying. I'm changing the player's size, and the player's eye height dictates where they suffocate. If I shrunk a player, moving the camera would do nothing if the player ran into a 1x1. They would start suffocating, and the immersion would be broken.

Why didn't you state that at the beginning rather than being cryptic about your uses?

I left it simple with a request. Had I known Lex wanted me to go into the whole backstory, I would have.

Unnoen, maybe he assumed that Forgers be familiar with mod's like Morph? One of the better known mod's and been around a long time.

Yes, an eye height was exposed SPECIFICALLY for Morph, and we decided it would be better for mods such as that to have a cleaner/more obvious and documented API instead of a magic 'eyeHeight' field for suffocating.

Had I known Lex wanted me to go into the whole backstory
...
you need to explain and justify your request better

Was this page helpful?
0 / 5 - 0 ratings