Skip to content

Commit

Permalink
fix tierByVoltage MAX tier off by one (GregTechCEu#2626)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Sep 22, 2024
1 parent ad02d8e commit ca583bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/gregtech/api/util/GTUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static int nearestLesser(@NotNull long[] array, long value) {
* tier that can handle it, {@code MAX} is returned.
*/
public static byte getTierByVoltage(long voltage) {
if (voltage >= Integer.MAX_VALUE) {
if (voltage >= GTValues.V[GTValues.MAX]) {
return GTValues.MAX;
}
return getOCTierByVoltage(voltage);
Expand Down

0 comments on commit ca583bc

Please sign in to comment.