From 923ca5e0c386849649c08922eff516d0af82913f Mon Sep 17 00:00:00 2001 From: ACGaming <4818419+ACGaming@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:53:48 +0200 Subject: [PATCH] Limit crucible scanning --- .../client/render/HSSoulAltarRender.java | 24 ++++++++++--------- .../tileentities/HSSoulAltarTE.java | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/mod/emt/harkenscythe/client/render/HSSoulAltarRender.java b/src/main/java/mod/emt/harkenscythe/client/render/HSSoulAltarRender.java index 8c4bf18..78153ec 100644 --- a/src/main/java/mod/emt/harkenscythe/client/render/HSSoulAltarRender.java +++ b/src/main/java/mod/emt/harkenscythe/client/render/HSSoulAltarRender.java @@ -57,19 +57,21 @@ public void render(HSSoulAltarTE te, double x, double y, double z, float partial GlStateManager.popAttrib(); GlStateManager.popMatrix(); - String soulsText = "Souls: " + te.soulCount; - GlStateManager.pushMatrix(); - GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5); - GlStateManager.rotate(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0, 1, 0); - GlStateManager.rotate(Minecraft.getMinecraft().getRenderManager().playerViewX, 1, 0, 0); - GlStateManager.scale(-0.025f, -0.025f, 0.025f); - GlStateManager.disableLighting(); - Minecraft.getMinecraft().fontRenderer.drawString(soulsText, -Minecraft.getMinecraft().fontRenderer.getStringWidth(soulsText) / 2, 0, 0xFFFFFF); - GlStateManager.enableLighting(); - GlStateManager.popMatrix(); - if (!stack.isEmpty()) { + // Display soul count + String soulsText = "Souls: " + te.soulCount; + GlStateManager.pushMatrix(); + GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5); + GlStateManager.rotate(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0, 1, 0); + GlStateManager.rotate(Minecraft.getMinecraft().getRenderManager().playerViewX, 1, 0, 0); + GlStateManager.scale(-0.025f, -0.025f, 0.025f); + GlStateManager.disableLighting(); + Minecraft.getMinecraft().fontRenderer.drawString(soulsText, -Minecraft.getMinecraft().fontRenderer.getStringWidth(soulsText) / 2, 0, 0xFFFFFF); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); + + // Display input stack count String stackText = String.valueOf(stack.getCount()); GlStateManager.pushMatrix(); GlStateManager.translate(x + 0.5, y + 2.7, z + 0.5); diff --git a/src/main/java/mod/emt/harkenscythe/tileentities/HSSoulAltarTE.java b/src/main/java/mod/emt/harkenscythe/tileentities/HSSoulAltarTE.java index 005f4bc..62e9116 100644 --- a/src/main/java/mod/emt/harkenscythe/tileentities/HSSoulAltarTE.java +++ b/src/main/java/mod/emt/harkenscythe/tileentities/HSSoulAltarTE.java @@ -174,9 +174,9 @@ public void update() this.flipA += (f - this.flipA) * 0.9F; this.pageFlip += this.flipA; - if (this.world.getWorldTime() % 40 == 39) + if (this.world.getWorldTime() % 20 == 19 && !this.getItem().isEmpty()) { - soulCount = scanCrucibleLevels() * 10; + this.soulCount = scanCrucibleLevels() * 10; } }