mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 05:48:00 +01:00
Fixed incorrect riding position
This commit is contained in:
parent
627adab1f6
commit
e45c237e82
3 changed files with 3 additions and 5 deletions
|
@ -31,7 +31,7 @@ public class PonyBounds {
|
|||
float delta = MinecraftClient.getInstance().getTickDelta();
|
||||
|
||||
Entity vehicle = entity.getVehicle();
|
||||
double vehicleOffset = vehicle == null ? 0 : vehicle.getHeight() - entity.getRidingOffset(vehicle);
|
||||
double vehicleOffset = vehicle == null ? 0 : vehicle.getHeight();
|
||||
|
||||
return new Vec3d(
|
||||
MathHelper.lerp(delta, entity.prevX, entity.getX()),
|
||||
|
|
|
@ -55,10 +55,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
|
|||
value *= factor;
|
||||
|
||||
if (hasVehicle()) {
|
||||
value += getVehicle().getEyeHeight(getVehicle().getPose());
|
||||
value -= getRidingOffset(getVehicle());
|
||||
value += getVehicle().getHeight();
|
||||
}
|
||||
|
||||
return Math.max(value, 0.1F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
|
|||
if (!entity.hasVehicle()) {
|
||||
stack.translate(0, 0, -entity.getWidth() / 2); // move us to the center of the shadow
|
||||
} else {
|
||||
stack.translate(0, entity.getRidingOffset(entity.getVehicle()), 0);
|
||||
stack.translate(0, -entity.getRidingOffset(entity.getVehicle()), 0);
|
||||
}
|
||||
|
||||
stack.scale(scale, scale, scale);
|
||||
|
|
Loading…
Reference in a new issue