Preserve rotation
This commit is contained in:
parent
204c8b78c4
commit
6593b6a5cf
|
|
@ -18,7 +18,15 @@ public class ServerGamePacketListenerImplMixin {
|
|||
if(player == this.player) {
|
||||
// use positionRider
|
||||
Vec3 oldPos = this.player.position();
|
||||
yRot = this.player.yRot;
|
||||
xRot = this.player.xRot;
|
||||
float yHeadRot = this.player.getYHeadRot();
|
||||
this.player.getRootVehicle().positionRider(this.player);
|
||||
// keep old rotation
|
||||
this.player.yRot = yRot;
|
||||
this.player.xRot = xRot;
|
||||
this.player.setYHeadRot(yHeadRot);
|
||||
// save old position
|
||||
this.player.xo = oldPos.x;
|
||||
this.player.yo = oldPos.y;
|
||||
this.player.zo = oldPos.z;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user