Skip to content
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

Open
stackotter opened this issue Sep 10, 2022 · 6 comments
Open

Implement autojump, ladders and stair/half slab climbing #124

stackotter opened this issue Sep 10, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@stackotter
Copy link
Owner

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 the PlayerVelocitySystem.

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.

@stackotter stackotter added the bug Something isn't working label Sep 10, 2022
@stackotter
Copy link
Owner Author

I've implementing autostepping now (stair/half slab/carpet/etc climbing). Now just ladders and autojump to go.

@stackotter
Copy link
Owner Author

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

@jmshgs
Copy link
Contributor

jmshgs commented Aug 16, 2023

wait. if you go up a ladder with a trapdoor it'll autoopen???
how did i not know this LOL

@stackotter
Copy link
Owner Author

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.

@jmshgs
Copy link
Contributor

jmshgs commented Aug 16, 2023

lol I didn’t even know that, ty

@stackotter
Copy link
Owner Author

Finished implementing climbing (vines, nether biome vines, and open trapdoors at the top of ladders)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants