Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I still don't quite understand how I use the Simple Network Implementation stuff

Featured Replies

Posted

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.

If you used GuiContainer/Container, the inventory content is automatically synced between client and server.

  • 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.

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.

  • 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.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.