修改HUD渲染坐标
This commit is contained in:
parent
1fc00c21f7
commit
b5de7df1ec
1 changed files with 6 additions and 6 deletions
|
@ -101,8 +101,8 @@ public class AmmoBarOverlay {
|
|||
event.getGuiGraphics().drawString(
|
||||
Minecraft.getInstance().font,
|
||||
getGunAmmoCount(player) + "",
|
||||
w / 1.5f - 64 / 1.5f + 1,
|
||||
h / 1.5f - 32,
|
||||
w / 1.5f - 64 / 1.5f,
|
||||
h / 1.5f - 48 / 1.5f,
|
||||
0xFFFFFF,
|
||||
true
|
||||
);
|
||||
|
@ -119,14 +119,14 @@ public class AmmoBarOverlay {
|
|||
);
|
||||
|
||||
poseStack.pushPose();
|
||||
poseStack.scale(0.9f, 1f, 1f);
|
||||
poseStack.scale(0.9f, 0.9f, 1f);
|
||||
|
||||
// 渲染物品名称
|
||||
event.getGuiGraphics().drawString(
|
||||
Minecraft.getInstance().font,
|
||||
centerString(gunItem.getGunDisplayName(), 20),
|
||||
w / 0.9f - 144 / 0.9f,
|
||||
h - 60,
|
||||
h / 0.9f - 60 / 0.9f,
|
||||
0xFFFFFF,
|
||||
true
|
||||
);
|
||||
|
@ -136,7 +136,7 @@ public class AmmoBarOverlay {
|
|||
Minecraft.getInstance().font,
|
||||
centerString(getGunAmmoType(stack), 20),
|
||||
w / 0.9f - 144 / 0.9f,
|
||||
h - 51,
|
||||
h / 0.9f - 51 / 0.9f,
|
||||
0xC8A679,
|
||||
true
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue