Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01:00
Fix horse movement
Dieser Commit ist enthalten in:
Ursprung
9d2d12b87b
Commit
c9eeed905b
@ -153,12 +153,14 @@ public final class BedrockPlayerAuthInputTranslator extends PacketTranslator<Pla
|
|||||||
case STOP_GLIDING -> sendPlayerGlideToggle(session, entity);
|
case STOP_GLIDING -> sendPlayerGlideToggle(session, entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (entity.getVehicle() instanceof BoatEntity) {
|
||||||
boolean up = inputData.contains(PlayerAuthInputData.UP);
|
boolean up = inputData.contains(PlayerAuthInputData.UP);
|
||||||
// Yes. These are flipped. It's always been an issue with Geyser. That's what it's like working with this codebase.
|
// Yes. These are flipped. It's always been an issue with Geyser. That's what it's like working with this codebase.
|
||||||
// Hi random stranger. I am six days into updating for 1.21.3. How's it going?
|
// Hi random stranger. I am six days into updating for 1.21.3. How's it going?
|
||||||
session.setSteeringLeft(up || inputData.contains(PlayerAuthInputData.PADDLE_RIGHT));
|
session.setSteeringLeft(up || inputData.contains(PlayerAuthInputData.PADDLE_RIGHT));
|
||||||
session.setSteeringRight(up || inputData.contains(PlayerAuthInputData.PADDLE_LEFT));
|
session.setSteeringRight(up || inputData.contains(PlayerAuthInputData.PADDLE_LEFT));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void sendPlayerGlideToggle(GeyserSession session, Entity entity) {
|
private static void sendPlayerGlideToggle(GeyserSession session, Entity entity) {
|
||||||
ServerboundPlayerCommandPacket glidePacket = new ServerboundPlayerCommandPacket(entity.getEntityId(), PlayerState.START_ELYTRA_FLYING);
|
ServerboundPlayerCommandPacket glidePacket = new ServerboundPlayerCommandPacket(entity.getEntityId(), PlayerState.START_ELYTRA_FLYING);
|
||||||
@ -228,7 +230,7 @@ public final class BedrockPlayerAuthInputTranslator extends PacketTranslator<Pla
|
|||||||
|
|
||||||
boolean sendMovement = false;
|
boolean sendMovement = false;
|
||||||
if (vehicle instanceof AbstractHorseEntity && !(vehicle instanceof LlamaEntity)) {
|
if (vehicle instanceof AbstractHorseEntity && !(vehicle instanceof LlamaEntity)) {
|
||||||
sendMovement = vehicle.isOnGround();
|
sendMovement = true;
|
||||||
} else if (vehicle instanceof BoatEntity) {
|
} else if (vehicle instanceof BoatEntity) {
|
||||||
if (vehicle.getPassengers().size() == 1) {
|
if (vehicle.getPassengers().size() == 1) {
|
||||||
// The player is the only rider
|
// The player is the only rider
|
||||||
@ -299,6 +301,7 @@ public final class BedrockPlayerAuthInputTranslator extends PacketTranslator<Pla
|
|||||||
vehiclePosition = vehiclePosition.down(vehicle.getDefinition().offset());
|
vehiclePosition = vehiclePosition.down(vehicle.getDefinition().offset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vehicle.setPosition(vehiclePosition);
|
||||||
ServerboundMoveVehiclePacket moveVehiclePacket = new ServerboundMoveVehiclePacket(
|
ServerboundMoveVehiclePacket moveVehiclePacket = new ServerboundMoveVehiclePacket(
|
||||||
vehiclePosition.getX(), vehiclePosition.getY(), vehiclePosition.getZ(),
|
vehiclePosition.getX(), vehiclePosition.getY(), vehiclePosition.getZ(),
|
||||||
vehicleRotation.getY() - 90, vehiclePosition.getX() // TODO I wonder if this is related to the horse spinning bugs...
|
vehicleRotation.getY() - 90, vehiclePosition.getX() // TODO I wonder if this is related to the horse spinning bugs...
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren