From 019ed5349f9f5035849bf4caa9bc879e137baee4 Mon Sep 17 00:00:00 2001 From: DStrand1 Date: Mon, 9 Aug 2021 01:04:54 -0500 Subject: [PATCH] remove ULV from overclock button --- .../api/capability/impl/AbstractRecipeLogic.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java b/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java index 64a6da05fe4..eb5503f6021 100755 --- a/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java +++ b/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java @@ -294,9 +294,9 @@ protected long getVoltageByTier(final int tier) { public String[] getAvailableOverclockingTiers() { final int maxTier = getOverclockingTier(getMaxVoltage()); - final String[] result = new String[maxTier + 2]; + final String[] result = new String[maxTier + 1]; result[0] = "gregtech.gui.overclock.off"; - if (maxTier + 1 >= 0) System.arraycopy(GTValues.VN, 0, result, 1, maxTier + 1); + if (maxTier >= 0) System.arraycopy(GTValues.VN, 1, result, 1, maxTier); return result; } @@ -422,13 +422,11 @@ public void enableOverclockVoltage() { setOverclockVoltage(getMaxVoltage()); } - // The overclocking tier - // it is 1 greater than the index into GTValues.V since here the "0 tier" represents 0 EU or no overclock public int getOverclockTier() { if (this.overclockVoltage == 0) { return 0; } - return 1 + getOverclockingTier(this.overclockVoltage); + return getOverclockingTier(this.overclockVoltage); } public void setOverclockTier(final int tier) { @@ -436,7 +434,7 @@ public void setOverclockTier(final int tier) { setOverclockVoltage(0); return; } - setOverclockVoltage(getVoltageByTier(tier - 1)); + setOverclockVoltage(getVoltageByTier(tier)); } @Override