I tried to paste in the code but for some reason even using the code bbcode it wasn't indenting correctly and was really hard to read, so check it out in the above link. We also tried to do some debugging so you can see where we are at.
Seems to logically be something in the Container code, probably within those for loops in the constructor.
I have no idea if what you're doing is right or wrong but assuming it is, all I can suggest is to put a crap load of System.out.print* lines inside the for loops (but before the actual calls) to print the parameters before making the call, then you can search your crash log for the numbers - that should at least give you an idea of when/where it happens which will help to solve why.
45 is a multiple of 9, and I see that the second addSlotToContainer nested for loop uses * 9 in it's call so I'd try that one first. But it could be anywhere, that logic is confusing the heck out of me
EDIT: I mean this line:
this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
I have no idea what's going on there (you did consider the order of operations right? How * and / happen before + and -) but just before this line is the first place I'd print to console from:
System.out.printf("%d %d %d", j + i * 9 + 9, 8 + j * 18, 84 + i * 18)
The +9 accounts for the 9 slots in the action bar assigned 0-8.
The j+i*9 will assign values from 0-8(+9) then 9-17 and so on.
The second two parameters are for slot x-y placement.
This logic shouldn't have any problems as I took most of it from vanilla. As the user on forge pointed out, it's something to do with the client side in GUI handler not being called.
You can check out the information here http://www.minecraftforge.net/forum/index.php/topic,21156.0.html
I tried to paste in the code but for some reason even using the code bbcode it wasn't indenting correctly and was really hard to read, so check it out in the above link. We also tried to do some debugging so you can see where we are at.
Thank you!!
I have no idea if what you're doing is right or wrong but assuming it is, all I can suggest is to put a crap load of System.out.print* lines inside the for loops (but before the actual calls) to print the parameters before making the call, then you can search your crash log for the numbers - that should at least give you an idea of when/where it happens which will help to solve why.
45 is a multiple of 9, and I see that the second addSlotToContainer nested for loop uses * 9 in it's call so I'd try that one first. But it could be anywhere, that logic is confusing the heck out of me
EDIT: I mean this line:
I have no idea what's going on there (you did consider the order of operations right? How * and / happen before + and -) but just before this line is the first place I'd print to console from:
The j+i*9 will assign values from 0-8(+9) then 9-17 and so on.
The second two parameters are for slot x-y placement.
This logic shouldn't have any problems as I took most of it from vanilla. As the user on forge pointed out, it's something to do with the client side in GUI handler not being called.
Be sure to quote my post if you want a reply.
lol @ Cameronazzi copy-pasting my sig into his
Darn, I feel like I'm going to have to do hours and hours of debugging and re-coding before I find some simple error..