From c9ff84d03b3848c0d191378933b361f325e81e96 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 9 Jun 2021 14:03:29 -0400 Subject: [PATCH] Test fix --- core/src/mindustry/ai/BlockIndexer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ai/BlockIndexer.java b/core/src/mindustry/ai/BlockIndexer.java index bb35852758..78ba4ccfb1 100644 --- a/core/src/mindustry/ai/BlockIndexer.java +++ b/core/src/mindustry/ai/BlockIndexer.java @@ -393,7 +393,8 @@ public class BlockIndexer{ blocksPresent[tile.floorID()] = true; blocksPresent[tile.overlayID()] = true; } - blocksPresent[tile.blockID()] = true; + //bounds checks only needed in very specific scenarios + if(tile.blockID() < blocksPresent.length) blocksPresent[tile.blockID()] = true; } public static class TileArray implements Iterable{