mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fix head position when riding more entity types (fixes compatibility with Sit mod and also mods where players can carry other players)
This commit is contained in:
parent
884fb62ff5
commit
ca04c3aed0
1 changed files with 1 additions and 6 deletions
|
@ -28,7 +28,6 @@ import net.minecraft.entity.*;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
@ -143,11 +142,7 @@ public class EquineRenderManager<
|
||||||
}
|
}
|
||||||
float eyeHeight = dimensions.eyeHeight() * factor;
|
float eyeHeight = dimensions.eyeHeight() * factor;
|
||||||
if (player.hasVehicle()) {
|
if (player.hasVehicle()) {
|
||||||
Vec3d attachment = dimensions.attachments().getPointNullable(EntityAttachmentType.VEHICLE, 0, 0);
|
eyeHeight += player.getVehicleAttachmentPos(player.getVehicle()).getY();
|
||||||
if (attachment != null) {
|
|
||||||
double yAttachment = attachment.getY();
|
|
||||||
eyeHeight += yAttachment * factor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dimensions.withEyeHeight(eyeHeight);
|
return dimensions.withEyeHeight(eyeHeight);
|
||||||
|
|
Loading…
Reference in a new issue