Skip to content

Commit

Permalink
Finish cl_showpos
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jun 21, 2023
1 parent 4cd2e5f commit 2f09aa1
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ Items.LIGHT, new ResourceLocation("level")
final LocalPlayer player = minecraft.player;
if (player == null) return;

poseStack.pushPose();
poseStack.scale(1f, 1f, 1f);

minecraft.font.draw(poseStack, Component.literal("name: ").append(player.getName()), 2, 11, 0xffffffff);

minecraft.font.draw(
Expand All @@ -516,6 +519,14 @@ Items.LIGHT, new ResourceLocation("level")
' ' + CL_SHOWPOS_FORMAT.format(Math.toDegrees(angle.z)),
2, 29, 0xffffffff
);

minecraft.font.draw(
poseStack,
"vel: " + CL_SHOWPOS_FORMAT.format(player.getDeltaMovement().length()),
2, 38, 0xffffffff
);

poseStack.popPose();
});

try {
Expand Down

0 comments on commit 2f09aa1

Please sign in to comment.