diff --git a/core/src/mindustry/entities/EntityGroup.java b/core/src/mindustry/entities/EntityGroup.java index 45e0377b97..ea8ef0cdb8 100644 --- a/core/src/mindustry/entities/EntityGroup.java +++ b/core/src/mindustry/entities/EntityGroup.java @@ -28,6 +28,7 @@ public class EntityGroup implements Iterable{ private int index; public static int nextId(){ + if(lastId >= Integer.MAX_VALUE - 2) lastId = 0; return lastId++; }