-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
Add elytra flying support and rocket support #3163
Conversation
does this work? |
It does but not super well tested |
will test it with https://github.com/SilkePilon/OpenDeliveryBot |
3d40053
to
75b6562
Compare
It seems that entity_metadata packets can report whether the player is flying or not. The code as it is will sometimes get kicked when the server rejects its elytra request |
48214ec
to
28c1f87
Compare
Turns out I had to pull the elytra is flying state and the firework attached to entity state from entity update msgs. I changed it to only set elytra flying / rockets when it detects them via that (similar to crouch). This fixes the occational kicked for flying issue I was seeing (now that server actually confirms flying and fireworks). There's also a test for using elytra in all the versions, and it seems to pass (but requires a minecraft-data bump, which I wasn't sure how to run in github) |
This is ready pending the following prs:
|
abdd33b
to
5ee1c1b
Compare
merged mcdata and p-entity because they were trivial for prismarine-physics and here we need proper reviews |
I see no breaking changes so should be relatively safe to merge. Elytra test itself looks fine so given that's passing I believe the PR is good to go. |
One thing I should point out is that the elytra test is passing since it doesn’t have the feature flags from minecraft data, so when we bump to that version we have to reevaluate whether I got the entity metadata parsing correct for all versions. As far as I can tell, its correct, but the entity id field switches between optvarint and varint, and the bot's entity id in the system tests is 0, so its hard to tell whether i'm seeing a firework being used vs applied in older versions. |
d4bcb09
to
4628c1c
Compare
4628c1c
to
29d7901
Compare
29d7901
to
6c072e5
Compare
thanks for the PR! Out of curiosity, why did you need elytra support / how do you intend to use it ? |
/makerelease |
Thanks for merging! It started with wanting an afk bot that I could run on my raspberry pi instead of leaving my laptop on, but without letting it mine or build, it couldn't reach afk spots high in the sky or really far away. tp commands work but felt a bit cheaty, so implementing elytra seemed like a fun project. Plus it's really cool watching the bot elytra fly in ways that I can't think fast enough to do myself |
No description provided.