Jump to content

Recommended Posts

Posted

I'm trying to send tile entity data from server to client using a scheme modelled on the one used by TileEntitySign. My TileEntity class has a getDescriptionPacket() method that returns a Packet250CustomPayload. When the client receives this, it finds its version of the tile entity and updates it.

 

Most of the time it works, but when the client initially connects to the server, some of my tile entity packets arrive before the Packet51MapChunk containing the corresponding block ID, so there is no tile entity there to update. If I create one of the appropriate type and put it there, it gets wiped out when the block ID arrives later.

 

Does anyone have any idea what I might be doing wrong? Are there any examples around that show how to do this correctly?

 

Code follows:

 

 

  Reveal hidden contents

 

Posted

Sorry for minor thread hijack, but is there any reason not to use Packet132TileEntityData for this? It already is a chunk packet, and gets handed to the TileEntity automatically, without any custom packet handler.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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