-
-
Notifications
You must be signed in to change notification settings - Fork 663
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
base: master
Are you sure you want to change the base?
Conversation
core/src/main/java/org/geysermc/geyser/entity/vehicle/VehicleComponent.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/entity/vehicle/ClientVehicle.java
Outdated
Show resolved
Hide resolved
59995a1
to
c348928
Compare
core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaRespawnTranslator.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java
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()); |
There was a problem hiding this comment.
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.
core/src/main/java/org/geysermc/geyser/translator/collision/BlockCollision.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/translator/level/block/entity/PistonBlockEntity.java
Outdated
Show resolved
Hide resolved
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 . |
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
PistonsTick vehicle boost if any player is controlling