From 5462c717cdb6f6ebd7e41626ce17ff25da890134 Mon Sep 17 00:00:00 2001 From: YoungOnion <39562198+YoungOnionMC@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:28:21 -0600 Subject: [PATCH] fix off by one --- src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java b/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java index 9f20eec2e2..3a065f4742 100644 --- a/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java +++ b/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java @@ -223,7 +223,7 @@ public static byte getFloorTierByVoltage(long voltage) { return GTValues.MAX_TRUE; } - return (byte) ((60 - Long.numberOfLeadingZeros(voltage - 1)) >> 1); + return (byte) ((60 - Long.numberOfLeadingZeros(voltage)) >> 1); } public static ItemStack copy(ItemStack... stacks) {