尝试添加乘客视角限制
This commit is contained in:
parent
af54a10135
commit
daa8c777d2
2 changed files with 9 additions and 1 deletions
|
@ -217,7 +217,16 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico
|
||||||
|
|
||||||
entity.setYBodyRot(this.getYRot());
|
entity.setYBodyRot(this.getYRot());
|
||||||
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
||||||
|
|
||||||
|
int i = this.getPassengers().indexOf(entity);
|
||||||
|
|
||||||
float f3 = Mth.clamp(f2, -80.0F, 80.0F);
|
float f3 = Mth.clamp(f2, -80.0F, 80.0F);
|
||||||
|
if (i == 2) {
|
||||||
|
f3 = Mth.clamp(f2, -160.0F, -20.0F);
|
||||||
|
}
|
||||||
|
if (i == 3) {
|
||||||
|
f3 = Mth.clamp(f2, 20.0F, 160.0F);
|
||||||
|
}
|
||||||
entity.yRotO += f3 - f2;
|
entity.yRotO += f3 - f2;
|
||||||
entity.setYRot(entity.getYRot() + f3 - f2);
|
entity.setYRot(entity.getYRot() + f3 - f2);
|
||||||
entity.setYHeadRot(entity.getYRot());
|
entity.setYHeadRot(entity.getYRot());
|
||||||
|
|
|
@ -322,7 +322,6 @@ public class SpeedboatEntity extends MobileVehicleEntity implements GeoEntity, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Level level = player.level();
|
Level level = player.level();
|
||||||
final Vec3 center = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
final Vec3 center = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue