interpolated look vector
(float partialTicks)
| 1509 | * interpolated look vector |
| 1510 | */ |
| 1511 | public Vec3 getLook(float partialTicks) |
| 1512 | { |
| 1513 | if (RotationUtil.isEnabled) { |
| 1514 | float[] clientRot = RotationUtil.clientRotation; |
| 1515 | return this.getVectorForRotation(clientRot[1], clientRot[0]); |
| 1516 | } |
| 1517 | if (partialTicks == 1.0F) |
| 1518 | { |
| 1519 | return this.getVectorForRotation(this.rotationPitch, this.rotationYaw); |
| 1520 | } |
| 1521 | else |
| 1522 | { |
| 1523 | float f = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * partialTicks; |
| 1524 | float f1 = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * partialTicks; |
| 1525 | return this.getVectorForRotation(f, f1); |
| 1526 | } |
| 1527 | } |
| 1528 | |
| 1529 | /** |
| 1530 | * Creates a Vec3 using the pitch and yaw of the entities rotation. |
no test coverage detected