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.

RaoulV

Members
  • Joined

  • Last visited

Everything posted by RaoulV

  1. Thanks, it's working now.
  2. Heh, for my infusion table I'm doing such things like this: public interface IInfusionRecipe { public ItemStack[] getRecipe(); public ItemStack getResult(); public int getCraftingDuration(); } And then there is also a InfusionManager that I wrote that checks if the itemstacks in the inventory of the block are equal to an infusion recipe added to the manager.
  3. Why is this not working:
  4. You're probably right. I made an ISynchronizedTile class that takes readData(ByteBuf) and writeData(ByteBuf). In detectAndSendChanges() I'm checking if the TE is an instance of ISynchronizedTile, if it is => write coords and do ((ISynchronizedTile) tile).readData(bytes). Upon receiving the packet I get the TE with the coords provided and call the writeData(). Thanks for the help!
  5. ICrafting wasn't really an option since I had to send NBT data. So, I fixed it, and diesieben you where right, sending updates when the GUI is not open is wrong. So I implemented an packet / channel handler and this is how I do it now: - a packet called PacketTileUpdate (handles sending tile updates with NBT data, compressed ) - a method sendNetworkUpdate(EntityPlayer player) in my TE-base class. - sendNetworkUpdate() is called in detectAndSendChanges() in the container. - upon receiving the update packet, it updates the NBT data from the TE. One final question, do I need to check if I'm serverside in detectAndChanges()? Or does that happen already?
  6. Those description packets aren't working as I said in my post, so that doesn't really help.
  7. Thats what I want and need. And even then, I still want to fix this issue. btw, I do not only want to send numericals...
  8. I am seeing that only upon joining the world the getDescriptionPacket() is send
  9. But onPacketData() and all that should work?
  10. Ok... still having 2 questions: 1) isn't the ICrafting system meant for progressbars etc. 2) would implementing a custom packet system be worth it for this use case?
  11. thanks for the response. I'm still planning on using that value in some other blocks too, so I guess ICrafting is a bad idea?
  12. I'm trying to sync TE from server -> client with getDescriptionPacket() and onDataPacket() but it isn't updating the TE clientside. Only onDataPacket() is called once. Code: http://pastebin.com/W5iuEchS Thanks.
  13. I'm having this problem: I'm having an block with an tile entity, where an inventory is attached to. The problem is, I have another block that is dependent on that inventory. So, if I rejoin the world and the inventory gets synced with NBT in the tile entity, it doesn't sync client side (that is needed because as soon as I open the other block that is dependented on that inventory, it crashed It only syncs the inventory server-side... Only if I open the inventory myself, it gets synced with the client. So, how do I sync the inventory from server -> client without actually opening the container?

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.