Use reflection to resize the array. System#arraycopy would be needed for that.
(NOTE: You should check the size of the array before resizing it, because some mods do it too.)
The important thing is : You have to set up your own Gui Handler and let it give the Container in getServerGuiElement, and the Gui in getClientGuiElement...
How many times should I say this;
Oh, I'm not saying to you when 'The code is totally wrong'.
It seems that OP doesn't know basic java. So it would be more helpful to tell him/her 'Learn Basic Java', I think.
Well, you should understand basic java to do this. The code is totally wrong.
Learn basic java, please.
To laci200270: Do not just provide copy-paste code.. It is far from how learning works.
There's the integrated server though, which I'm not sure if it would count or not. The method is in FMLCommonHandler which I would guess means it's common between server/client, that or a stupid name for the class.
Yes but it would not work on Integrated Server.
What.. That code would crash when you enters SMP server. There is no MinecraftServer instance in client side!
+ When you have to UPDATE something, then you should do that on the server.
That means, you need to send packet to the server.
Weird lighting glitch would be from tooltip rendering. As I said, render the Tooltip AFTER everything is rendered.
And item overlapping cannot happen if item is rendered before the overlay is rendered...
So, post your current code.
No, it will solve this problem: http://i.imgur.com/Lqfv5jY.png
+ I said this thing wrong: You should render the item after the overlay is rendered. You should render item before the overlay is rendered.
And, draw the tooltip after everything is rendered.
You should render the item after the overlay is rendered.. There is no other way for this.
+ It would be your UV problem. Don't use drawTexturedModalRect.
since it uses fixed u/x rate, it would use wrong UV and might cause problems like yours.
Instead make your own version for that. There you should set the (u,v) to (0,1),(1,1),(1,0),(0,0).
First, make a class implementing IMessage.
Then put the packet bytestream reading/writing code into the fromBytes(read) and toBytes(write) in the class.
(you should store fields like captainId and hookId in the class)
and make another class implementing IMessageHandler, and in the method 'onMessage' do what you want when packet is received.
Of course you can do that. Use IRecipe to add NBT when crafted by player.
(There is a tutorial for getting player from IRecipe in Tutorial section in this forum)
And in addToolTip add the player name to the tooltip.
Mainly api is for those who want compatibility,
and dev is for those who want total addons. (AFAIK)
Anyway You have to check the mod documentation, since there could be some exceptions.