Jump to content

RaoulV

Members
  • Posts

    13
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

RaoulV's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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?
×
×
  • Create New...

Important Information

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