-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement autojump, ladders and stair/half slab climbing #124
Comments
I've implementing autostepping now (stair/half slab/carpet/etc climbing). Now just ladders and autojump to go. |
I've also implemented ladder climbing now. TODO: Open trapdoors at the top of ladders should act like an extension of the ladder just like in 1.16.1 vanilla |
wait. if you go up a ladder with a trapdoor it'll autoopen??? |
nah, a trapdoor above a ladder just gets treated as if it’s a ladder if it’s open, so that you can climb it. |
lol I didn’t even know that, ty |
Finished implementing climbing (vines, nether biome vines, and open trapdoors at the top of ladders) |
If you fix this issue it'll give you a good introduction to the client's ECS-based physics system.
All three of these tasks are pretty inter-related (especially the first and last). That's why I have grouped them together.
At the moment, if the player comes up against the side of a block they stop. However, if the block's top is only half a block higher than the player's current position they should be bumped up half a block so that they end up on the block (or something like that at least) and if the block is a ladder they should be given some upwards velocity to start climbing it, and if they have auto jump and the vertical distance to the top of the block is a block or less they should auto jump. That's the gist of it anyway, I don't exactly remember the specifics so it'd be best to check for yourself.
To investigate how each of these is implemented by vanilla, you can decompile vanilla using MCPReborn or the Yarn project, but please try your best to not just copy their implementation, because it's probably bad and it might not fit into the ECS very well. You'll want to probably put auto jump logic into the
PlayerJumpSystem
and ladder climbing logic into thePlayerVelocitySystem
.Feel free to ask for help on the Discord server because I do have some notes about the vanilla physics system which might be useful.
The text was updated successfully, but these errors were encountered: