From da9d55a2494b373ae433cc587ce512ae5e04bfce Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Wed, 9 Jul 2025 21:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=81=AB=E7=82=AE=E6=8C=87?= =?UTF-8?q?=E7=A4=BA=E5=99=A8=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/overlay/SpyglassRangeOverlay.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/client/overlay/SpyglassRangeOverlay.java b/src/main/java/com/atsuishio/superbwarfare/client/overlay/SpyglassRangeOverlay.java index 1d18a0bc5..0b78c853d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/overlay/SpyglassRangeOverlay.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/overlay/SpyglassRangeOverlay.java @@ -59,6 +59,11 @@ public class SpyglassRangeOverlay implements LayeredDraw.Layer { var screenWidth = guiGraphics.guiWidth(); var screenHeight = guiGraphics.guiHeight(); + if (ClientEventHandler.holdArtilleryIndicator > 0) { + RenderHelper.fill(guiGraphics, RenderType.guiOverlay(), (float) screenWidth / 2 - 20, (float) (screenHeight / 2 + 44), (float) screenWidth / 2 + 20, (float) screenHeight / 2 + 48, -90, -16777216); + RenderHelper.fill(guiGraphics, RenderType.guiOverlay(), (float) screenWidth / 2 - 20, (float) (screenHeight / 2 + 44), (float) (screenWidth / 2 - 20 + 4 * ClientEventHandler.holdArtilleryIndicator), (float) screenHeight / 2 + 48, -90, -1); + } + if (((player.isUsingItem() && player.getUseItem().is(ModItems.ARTILLERY_INDICATOR.get())) || player.isScoping()) && mc.options.getCameraType() == CameraType.FIRST_PERSON) { if (player.getUseItem().is(ModItems.ARTILLERY_INDICATOR.get())) { ItemStack stack = player.getUseItem(); @@ -115,9 +120,6 @@ public class SpyglassRangeOverlay implements LayeredDraw.Layer { } } - RenderHelper.fill(guiGraphics, RenderType.guiOverlay(), (float) screenWidth / 2 - 20, (float) (screenHeight / 2 + 44), (float) screenWidth / 2 + 20, (float) screenHeight / 2 + 48, -90, -16777216); - RenderHelper.fill(guiGraphics, RenderType.guiOverlay(), (float) screenWidth / 2 - 20, (float) (screenHeight / 2 + 44), (float) (screenWidth / 2 - 20 + 4 * ClientEventHandler.holdArtilleryIndicator), (float) screenHeight / 2 + 48, -90, -1); - poseStack.popPose(); }