Posted October 24, 201410 yr When clicking on any Slot in the GUI with index above 45 I get a index out of bounds error report from java array checker, I understand the error but not how to fix it, any ideas? Main Mod File http://tny.cz/8d48209c Weapons Forge Block File http://tny.cz/bd64a0f1 Weapons Forge GUI File http://tny.cz/caa87993 Weapons Forge Tile Entity http://tny.cz/862a7839 Weapons Forge Container http://tny.cz/95426f9a Weapons Forge Slot http://tny.cz/9e071901 Error Report http://tny.cz/4c117e8e Thanks! Joe,
October 24, 201410 yr The order in which you Container#addSlotToContainer is really important. You need to keep it in mind when writing #transferStackInSlot. In your current state, you are adding 36 slots from player inventory, then 1 "output slot", then 9 "input slots". But your tile entity has 17 item slots.
October 24, 201410 yr Author The order in which you Container#addSlotToContainer is really important. You need to keep it in mind when writing #transferStackInSlot. In your current state, you are adding 36 slots from player inventory, then 1 "output slot", then 9 "input slots". But your tile entity has 17 item slots. I have tried adding the player slots after the rest and as you can see in the code the other way round with no luck. Correct me if my maths is wrong but the input slots loops should add 16 slots not 9, which with the output slot is 17 in the tile entity and the 36 from the player?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.