diff --git a/core/src/mindustry/type/ItemSeq.java b/core/src/mindustry/type/ItemSeq.java index 61bcc37e3a..7125f47901 100644 --- a/core/src/mindustry/type/ItemSeq.java +++ b/core/src/mindustry/type/ItemSeq.java @@ -124,6 +124,7 @@ public class ItemSeq implements Iterable, JsonSerializable{ } public void add(Item item, int amount){ + if(item.id >= values.length) return; //content patches can change ID length values[item.id] += amount; total += amount; }