优化简易队友标识

This commit is contained in:
Atsuishio 2025-07-15 00:42:29 +08:00 committed by Light_Quanta
parent 5a593b0634
commit 726bb6f42e
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -110,7 +110,11 @@ public class VehicleTeamOverlay implements LayeredDraw.Layer {
List<Entity> entities = SeekTool.getPlayer(player, player.level()); List<Entity> entities = SeekTool.getPlayer(player, player.level());
for (var e : entities) { for (var e : entities) {
if (e != null) { if (e != null) {
Vec3 pos = new Vec3(Mth.lerp(partialTick, e.xo, e.getX()), Mth.lerp(partialTick, e.yo + e.getBbHeight() / 2, e.getY() + e.getBbHeight() / 2), Mth.lerp(partialTick, e.zo, e.getZ())); Entity team = e;
if (e.getVehicle() != null) {
team = e.getVehicle();
}
Vec3 pos = new Vec3(Mth.lerp(partialTick, team.xo, team.getX()), Mth.lerp(partialTick, team.yo + team.getBbHeight() / 2, team.getY() + team.getBbHeight() / 2), Mth.lerp(partialTick, team.zo, team.getZ()));
Vec3 point = VectorUtil.worldToScreen(pos, cameraPos); Vec3 point = VectorUtil.worldToScreen(pos, cameraPos);
if (point != null) { if (point != null) {
float xf = (float) point.x; float xf = (float) point.x;