I have a 9x3 container opened by a button in the inventory. Whenever I open it, it gives me this error:
In the container, the inventory of the player gets messed up. The only items that appear are in a 3x3 area on the far left of the inventory (slots 1-3, 10-12, 19-21). In the new inventory, the only items able to be placed are in, again, a 3x3 area in those same slots, but in the new inventory. The hotbar is unaffected. I have tried increasing the size of the inventory that is created, but it will give the same error just with whatever number I put in instead of 27. I would try to figure this out on my own but I can't figure out exactly what the error message means (Is 27 the index it is trying to access? The size of the array? Then how would I know the index/size?) and I've run out of leads for what the problem could be.
Here is my code:
EventSpellBookButton.java (Opens Container)
CardContainer.java
To be honest I'm not entirely sure where the problem is, but hopefully this is enough information. Let me know if you need any more info or if you need me to create a GitHub repository for all my code.