mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-04-01 01:05:27 +02:00
Fixed incorrect eye height in vehicles when filly cam is turned off
This commit is contained in:
parent
73cc5ecc54
commit
21a70d205a
1 changed files with 9 additions and 6 deletions
|
@ -47,14 +47,17 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
|
||||||
IPony pony = MineLittlePony.getInstance().getManager().getPony(this);
|
IPony pony = MineLittlePony.getInstance().getManager().getPony(this);
|
||||||
|
|
||||||
if (!pony.getRace(false).isHuman()) {
|
if (!pony.getRace(false).isHuman()) {
|
||||||
value *= pony.getMetadata().getSize().getEyeHeightFactor();
|
float factor = pony.getMetadata().getSize().getEyeHeightFactor();
|
||||||
|
if (factor != 1) {
|
||||||
|
value *= factor;
|
||||||
|
|
||||||
if (hasVehicle()) {
|
if (hasVehicle()) {
|
||||||
value += getVehicle().getEyeHeight(getVehicle().getPose());
|
value += getVehicle().getEyeHeight(getVehicle().getPose());
|
||||||
value -= getVehicle().getMountedHeightOffset();
|
value -= getVehicle().getMountedHeightOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.max(value, 0.1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(value, 0.1F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Add table
Reference in a new issue