From 6b2229ffb9d7f68d9a229252fdd8cfa08f34b166 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 4 Nov 2023 17:38:50 -0400 Subject: [PATCH] Fixed #9239 --- core/src/mindustry/entities/EntityGroup.java | 1 + 1 file changed, 1 insertion(+) 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++; }