尝试修改边框渲染层级失败

This commit is contained in:
Atsuihsio 2025-01-14 03:03:11 +08:00
parent 8d8d2169b1
commit ea691a7d5f
2 changed files with 8 additions and 7 deletions

View file

@ -68,7 +68,8 @@ public class LandArmorHudOverlay {
if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) {
int addW = (w / h) * 48;
int addH = (w / h) * 27;
preciseBlit(guiGraphics, FRAME, (float) -addW / 2, (float) -addH / 2, 0, 0.0F, w + addW, h + addH, w + addW, h + addH);
// TODO 把黑边框移动到最底层
preciseBlit(guiGraphics, FRAME, (float) -addW / 2, (float) -addH / 2,1, 0, 0.0F, w + addW, h + addH, w + addW, h + addH);
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/compass.png"), (float) w / 2 - 128, (float) 6, 128 + ((float) 64 / 45 * player.getYRot()), 0, 256, 16, 512, 16);
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/speed_frame.png"), (float) w / 2 - 144, (float) h / 2 - 6, 0, 0, 50, 18, 50, 18);

View file

@ -60,17 +60,17 @@ public class VehicleHudOverlay {
if (vehicle instanceof EnergyVehicleEntity energyVehicleEntity) {
float energy = energyVehicleEntity.getEnergy();
float maxEnergy = energyVehicleEntity.getMaxEnergy();
guiGraphics.blit(ENERGY, 10, h - 22 - compatHeight, 0, 0, 8, 8, 8, 8);
guiGraphics.blit(HEALTH_FRAME, 20, h - 21 - compatHeight, 0, 0, 60, 6, 60, 6);
guiGraphics.blit(HEALTH, 20, h - 21 - compatHeight, 0, 0, (int) (60 * energy / maxEnergy), 6, 60, 6);
guiGraphics.blit(ENERGY, 10, h - 22 - compatHeight,100, 0, 0, 8, 8, 8, 8);
guiGraphics.blit(HEALTH_FRAME, 20, h - 21 - compatHeight,100, 0, 0, 60, 6, 60, 6);
guiGraphics.blit(HEALTH, 20, h - 21 - compatHeight,100, 0, 0, (int) (60 * energy / maxEnergy), 6, 60, 6);
}
if (vehicle instanceof VehicleEntity pVehicle) {
float health = pVehicle.getHealth();
float maxHealth = pVehicle.getMaxHealth();
guiGraphics.blit(ARMOR, 10, h - 13 - compatHeight, 0, 0, 8, 8, 8, 8);
guiGraphics.blit(HEALTH_FRAME, 20, h - 12 - compatHeight, 0, 0, 60, 6, 60, 6);
guiGraphics.blit(HEALTH, 20, h - 12 - compatHeight, 0, 0, (int) (60 * health / maxHealth), 6, 60, 6);
guiGraphics.blit(ARMOR, 10, h - 13 - compatHeight,100, 0, 0, 8, 8, 8, 8);
guiGraphics.blit(HEALTH_FRAME, 20, h - 12 - compatHeight,100, 0, 0, 60, 6, 60, 6);
guiGraphics.blit(HEALTH, 20, h - 12 - compatHeight,100, 0, 0, (int) (60 * health / maxHealth), 6, 60, 6);
}
poseStack.popPose();