cookiegalaxy Posted April 1, 2021 Share Posted April 1, 2021 [I've written lots of code before, but this would be my first time writing a minecraft mod from scratch] I'm looking to adjust the height of the first person camera with client-side modifications to work with a custom player model. Based on reading some of the decompiled code from MCP and the source code for https://github.com/Exopandora/ShoulderSurfing , I believe I need to update the getEyeHeight method. From what I've read, the two standard way of achieving this would be Access Transformers and Bytecode manipulation. I'm wondering if there's a simpler way I could modify this value or rewrite the method? ```Java public float getEyeHeight() { float f = 1.62F; if (this.isPlayerSleeping()) { f = 0.2F; } else if (!this.isSneaking() && this.height != 1.65F) { if (this.isElytraFlying() || this.height == 0.6F) { f = 0.4F; } } else { f -= 0.08F; } return f; } ``` Method taken from MCP with minecraft version 1.12.2 and the class EntityPlayer. Right now I'd like to try something simple like changing `float f = 1.62F` to 1.20F or something like that. Any direction or help would be appreciated. Quote Link to comment Share on other sites More sharing options...
ChampionAsh5357 Posted April 2, 2021 Share Posted April 2, 2021 There are events within EntityEvent now that handle this (Size and EyeHeight iirc) for 1.16. Note, if you are requesting help for 1.12.2, that version is not supported on the forums. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.