优化火炮指示器进度条
This commit is contained in:
parent
b936f29e97
commit
da9d55a249
1 changed files with 5 additions and 3 deletions
|
@ -59,6 +59,11 @@ public class SpyglassRangeOverlay implements LayeredDraw.Layer {
|
||||||
var screenWidth = guiGraphics.guiWidth();
|
var screenWidth = guiGraphics.guiWidth();
|
||||||
var screenHeight = guiGraphics.guiHeight();
|
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.isUsingItem() && player.getUseItem().is(ModItems.ARTILLERY_INDICATOR.get())) || player.isScoping()) && mc.options.getCameraType() == CameraType.FIRST_PERSON) {
|
||||||
if (player.getUseItem().is(ModItems.ARTILLERY_INDICATOR.get())) {
|
if (player.getUseItem().is(ModItems.ARTILLERY_INDICATOR.get())) {
|
||||||
ItemStack stack = player.getUseItem();
|
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();
|
poseStack.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue