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

feat: auto switch elytra when falling #4

Conversation

zly2006
Copy link

@zly2006 zly2006 commented Jun 22, 2024

and back to the previous item when landing.

@sakura-ryoko
Copy link
Owner

sakura-ryoko commented Jun 22, 2024

I'll merge this, but it needs to check the this.fallDistance before activating the Elytra Swap, because as-is, you can just "hop" around and constantly swap your elytra and chest.

Don't worry, I'll fix it.

@sakura-ryoko sakura-ryoko merged commit 7e4759b into sakura-ryoko:pre-rewrite/fabric/1.21 Jun 22, 2024
2 checks passed
@zly2006
Copy link
Author

zly2006 commented Jun 23, 2024

I'll merge this, but it needs to check the this.fallDistance before activating the Elytra Swap, because as-is, you can just "hop" around and constantly swap your elytra and chest.

Don't worry, I'll fix it.

No. You should NOT check this, imagine you are on the ground, if you are wearing elytra you can double click the space bar and then use a firework rocket to take off. However, requiring fallDiatance >= 20 makes it impossible to take off from the ground.

Also, a small issue when I was testing this feature: when you are jumping, the game is also trying to switch elytra (you can hear a sound, but it is switched back soon), this need more tests.

Btw, you don't need to merge my pull requests so quickly. If you want to fix something you can make changes at my branch and then push to my repo, github will display your changes on this pull request page, and then I can discuss the changes. PRs should be merged only if it seems stable enough imo.

@zly2006 zly2006 deleted the 1.21-auto-switch-elytra branch June 23, 2024 02:56
@zly2006
Copy link
Author

zly2006 commented Jun 23, 2024

And why Inspired by GoodTimeWithScar? I was in fact inspired by this mod. (I am sure I made this myself, I didn't copy any code of them.)

@sakura-ryoko
Copy link
Owner

sakura-ryoko commented Jun 23, 2024

And why Inspired by GoodTimeWithScar? I was in fact inspired by this mod. (I am sure I made this myself, I didn't copy any code of them.)

It was a joke, not sure if you got the joke with it.

@sakura-ryoko
Copy link
Owner

sakura-ryoko commented Jun 23, 2024

No. You should NOT check this, imagine you are on the ground, if you are wearing elytra you can double click the space bar and then use a firework rocket to take off. However, requiring fallDiatance >= 20 makes it impossible to take off from the ground.

I just tested this, and wearing an Elytra using rockets works as expected. What was actually happening is, it didn't matter if I was wearing a chestplate, Elytra, or nothing, and just "jumped" around not meaning to take off, the game was just constantly swapping back and forth when I would never want them to swap; since it was not taking into consideration any sort of "falling" even if it was just 1 block high jump.

To me, the meaning of this feature, is to easily swap between an Elytra and Chestplate while falling at least 4-5+ blocks; and not by just "hopping around" .

Perhaps I could make the "fall distance" a configuration, where setting the value to "0" would return the same behavior.

@zly2006
Copy link
Author

zly2006 commented Jun 23, 2024

No. You should NOT check this, imagine you are on the ground, if you are wearing elytra you can double click the space bar and then use a firework rocket to take off. However, requiring fallDiatance >= 20 makes it impossible to take off from the ground.

I just tested this, and wearing an Elytra using rockets works as expected. What was actually happening is, it didn't matter if I was wearing a chestplate, Elytra, or nothing, and just "jumped" around not meaning to take off, the game was just constantly swapping back and forth when I would never want them to swap; since it was not taking into consideration any sort of "falling" even if it was just 1 block high jump.

If you want to use firework rockets, you must be in a fall flying state, so this is necessary for taking off from the ground.

To me, the meaning of this feature, is to easily swap between an Elytra and Chestplate while falling at least 4-5+ blocks; and not by just "hopping around" .

This is useful for me, some machines have 1-2 block gap, and this feature helps me jump and fly through the gap.

Perhaps I could make the "fall distance" a configuration, where setting the value to "0" would return the same behavior.

So I suggest making this option default to 0 for the reasons mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants