Error: java.lang.ArrayIndexOutOfBoundsException: -7

oh hey i know this one! it happens during AnvilChunkLoader.loadEntities, and crashes trying to access the block storage array, it’s most likely the crash caused by tile entities having their position set outside the world bounds (for example in negative Y). you can try this at home: create a block with a tile entity, change that tile entity’s Y position to -1, close the world and re-open it. i don’t know what would cause this as i can’t think of any instance of a tile’s coordinates being edited directly and i don’t know why this is so common, i assume it’s some issue with the saving process where unrelated date writes over the position values, causing them to be in weird places.

in fact i recently wrote a detector for that, although it’s a command that has to be used manually and it can’t fix the issue (yet). i wish there was a way to make the process automatic or have basic sanity checking when loading things but i don’t know how core mods work :frowning:

2 Likes