mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-10-31 16:00:04 +01:00
Fixed an issue with switching between repair types.
This commit is contained in:
parent
ab480dc587
commit
07a334d1b9
@ -41,9 +41,9 @@ public enum RepairType {
|
||||
}
|
||||
|
||||
public RepairType getNext(Player player) {
|
||||
for (int i = 0; i < values().length; i++) {
|
||||
for (int i = 1; i < values().length + 1; i++) {
|
||||
int index = ordinal();
|
||||
int nextIndex = index + 1;
|
||||
int nextIndex = index + i;
|
||||
RepairType[] cars = RepairType.values();
|
||||
nextIndex %= cars.length;
|
||||
RepairType type = cars[nextIndex];
|
||||
|
Loading…
Reference in New Issue
Block a user