diff --git a/src/main/java/com/minelittlepony/unicopia/util/RegistryIndexer.java b/src/main/java/com/minelittlepony/unicopia/util/RegistryIndexer.java index e842dafd..6745b4ea 100644 --- a/src/main/java/com/minelittlepony/unicopia/util/RegistryIndexer.java +++ b/src/main/java/com/minelittlepony/unicopia/util/RegistryIndexer.java @@ -17,7 +17,7 @@ public class RegistryIndexer { } public int size() { - return values.size(); + return values.size() - 1; } public int indexOf(T value) { @@ -45,7 +45,7 @@ public class RegistryIndexer { } private int wrapIndex(int index) { - int sz = size(); + int sz = values.size(); while (index < 0) { index += sz; }