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

Emulate client side vehicle movement #4648

Merged
merged 43 commits into from
Aug 15, 2024

Conversation

AJ-Ferguson
Copy link
Member

@AJ-Ferguson AJ-Ferguson commented May 8, 2024

This PR adds support for vehicles that are controlled by the client (Camel, Strider, Pig).

Movement should be extremely close to a real java client, and many situations are accurately handled such as fluid, slime and honey blocks, climbing, etc.

Todo

  • Pistons
  • Tick vehicle boost if any player is controlling

@Kas-tle Kas-tle added the PR: Needs Testing When a PR needs testing but is currently not under review label May 8, 2024
@onebeastchris onebeastchris linked an issue May 10, 2024 that may be closed by this pull request
@AJ-Ferguson AJ-Ferguson changed the base branch from master to dev May 17, 2024 20:44
@AJ-Ferguson AJ-Ferguson marked this pull request as ready for review May 24, 2024 00:19
@AJ-Ferguson AJ-Ferguson added the PR: Needs review Indicates that a PR is functional and review-ready. label May 24, 2024
@AJ-Ferguson AJ-Ferguson changed the base branch from dev to master June 11, 2024 02:43
gradle/libs.versions.toml Show resolved Hide resolved

ServerboundMoveVehiclePacket moveVehiclePacket = new ServerboundMoveVehiclePacket(javaPos.getX(), javaPos.getY(), javaPos.getZ(), rotation.getX(), rotation.getY());
vehicle.getSession().sendDownstreamPacket(moveVehiclePacket);
vehicle.getSession().setLastVehicleMoveTimestamp(System.currentTimeMillis());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specifically a requirement now, but if we're tracking ticks we might be able to revisit some of these currentTimeMillis calls.

@onebeastchris onebeastchris dismissed Redned235’s stale review July 12, 2024 01:02

Review was addressed

@7Wdev
Copy link

7Wdev commented Jul 30, 2024

After testing this out, everything is working fine, the only issue I noticed is that the animation of the strider seems to be broken, it moves standstill .

@AJ-Ferguson AJ-Ferguson merged commit 34bab14 into GeyserMC:master Aug 15, 2024
2 checks passed
XingLingQAQ pushed a commit to XingLingQAQ/Geyser that referenced this pull request Sep 25, 2024
* WIP client side vehicles

* Address reviews and remove use of Optional

* Only tick active vehicle

* Track world ticks

* Fixes for Camel dash and pose transition

* Remove vehicle parameter

* Start using blocks refactor

* Update BlockRegistryPopulator

* Update blocks

* Support step height attribute

* Use climbable block tag and TrapDoorBlock

* Lock camel rotation if stationary

* Fix boost ticking

* Keep cache of surrounding blocks

* Fix bug causing BoundingBox position to change in CollisionManager

* Clamp user input

* Support weaving status effect

* Support gravity attribute

* Piston support

* Tick boost for Pig and Strider if any player is controlling

* Submodule

* Address some reviews

* Support world border

* Optimize world border check

* Small optimizations

* Add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Needs review Indicates that a PR is functional and review-ready. PR: Needs Testing When a PR needs testing but is currently not under review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't move mounted entities with carrot/warped fungus on a stick
6 participants