stackotter / delta-client

An open source Minecraft Java Edition client built for speed.

Home Page:https://deltaclient.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement autojump, ladders and stair/half slab climbing

stackotter opened this issue · comments

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.

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???
how did i not know this LOL

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)