Skip to content

Commit

Permalink
Fix F1 disabling automations
Browse files Browse the repository at this point in the history
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
  • Loading branch information
Octol1ttle committed Mar 2, 2024
1 parent 246ad92 commit 6486997
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/main/java/ru/octol1ttle/flightassistant/FACallbacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ private static void setupCommandRegistration() {

private static void setupWorldRender() {
WorldRenderEvents.END.register(context -> {
if (HudRenderer.getHost() == null) {
HudRenderer.INSTANCE = new HudRenderer(MinecraftClient.getInstance());
}
ComputerHost host = HudRenderer.getHost();
if (host != null && !host.faulted.contains(host.data)) {
host.tick();

if (!host.faulted.contains(host.data)) {
Matrix3f inverseViewRotationMatrix = RenderSystem.getInverseViewRotationMatrix();
host.data.updateRoll(inverseViewRotationMatrix.invert());
}
Expand All @@ -63,7 +68,6 @@ private static void setupHudRender() {
if (HudRenderer.getHost() == null) {
HudRenderer.INSTANCE = new HudRenderer(client);
}
HudRenderer.getHost().tick();

HudRenderer.INSTANCE.render(client, drawContext, tickDelta);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void render(DrawContext context, TextRenderer textRenderer) {

if (FAConfig.indicator().showSpeedReadout) {
drawRightAlignedText(textRenderer, context, asText("%.2f", data.speed), xSpeedText, dim.yMid - 3, FAConfig.indicator().frameColor);
drawBorder(context, xSpeedText - 28, dim.yMid - 5, 30, FAConfig.indicator().frameColor);
drawBorder(context, xSpeedText - 29, dim.yMid - 5, 30, FAConfig.indicator().frameColor);

int frameWidth = dim.rFrame - dim.lFrame;
if (FAConfig.indicator().showGroundSpeedReadout) {
Expand Down

0 comments on commit 6486997

Please sign in to comment.