Posted July 15, 201411 yr I've read diesieben07's and Ablaze's tutorials on the SNI stuff and I still don't quite understand it. I'm working on a mod with a single block which is a tile entity that has two inventories. Basically what I want to know is when the inventory gets updated (however that happens, I assume there's an event to use) I create an appropriate packet and send it using the static SNW instance I made in the preInit event? Also, how do I convert all the ItemStacks in the inventories into bytes for the toBytes method when my packet class implements IMessage? Also, how do I know what value to pass for the fourth paramter of registerMessage? I like trains.
July 15, 201411 yr If you used GuiContainer/Container, the inventory content is automatically synced between client and server.
July 15, 201411 yr Author If you used GuiContainer/Container, the inventory content is automatically synced between client and server. I'm using the IInventory interface, but I'm not sure of some methods. But that's for another time perhaps. I like trains.
July 15, 201411 yr You don't use any GUI then ? As long as you keep stuff server-side, I don't see the need for packets there. There is ByteBufUtil class you might want to look into.
July 15, 201411 yr Author I haven't gotten that far yet. I'm still figuring out proxies, and tile entities and inventories and that stuff. I will have a GUI, I don't know what to do for that either. I like trains.
July 16, 201411 yr Author My machine will have three inventories, one for input which will hold 9 ItemStacks, a processing slot which will hold 1 ItemStack then one for output which will also hold 9 ItemStacks. I like trains.
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.