添加直升机HUD的指南针

This commit is contained in:
Atsuihsio 2025-01-07 00:01:17 +08:00
parent 09b4179e47
commit 5bd7573798
2 changed files with 3 additions and 0 deletions

View file

@ -85,6 +85,9 @@ public class HelicopterHudOverlay {
if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) { if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) {
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_base.png"), k, l, 0, 0.0F, i, j, i, j); preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_base.png"), k, l, 0, 0.0F, i, j, i, j);
renderDriverAngle(guiGraphics, player, mobileVehicle, k, l, i, j); renderDriverAngle(guiGraphics, player, mobileVehicle, k, l, i, j);
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/compass.png"), (float) w / 2 - 128, (float) 6, 128 + ((float) 64 / 45 * mobileVehicle.getYRot()), 0, 256, 16, 512, 16);
poseStack.pushPose(); poseStack.pushPose();
poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f, 0); poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f, 0);
float pitch = iHelicopterEntity.getRotX(event.getPartialTick()); float pitch = iHelicopterEntity.getRotX(event.getPartialTick());

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B