Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to course page

Forging a Minecraft mod

Basic Minecraft modding with Minecraft Forge

Updating tile entity on login

  • 2013-10-08 18:03:17
    So i've had some problems synching tile entity with client on player load. It stays that way until i interact with a block or cause a block update.

    How can i make a tile entity eg. send a single packet on player login? Or make it force a single block update?
  • 2013-10-08 20:09:01
    The way that always works is for the client(when it realizes it doesn't have the data) sends a packet to the server. That packet tells the server that the specific client requires some information and therefore it sends a packet back to the client.

    Depending on what you are doing, however, there might be easier solutions.
  • 2013-10-08 21:09:54
    It does that when i interact with the block, but i would like to know if i can send the packet each time a player joins the world to automtically update the data.

    Basically it's messing up block rendering, since i need to open gui to update it.

    I tried using EntityJoinWorldEvent but doesn't seem to be working correctly.
  • 2013-10-09 05:22:12
    Well, if it does that when you interact with the block simply make sure it's done as soon as possible.
  • 2013-10-09 17:42:06
    I managed to solve it, i used IConnectionHandler and ordered a server to send a packets to player that just joined in.

    Not sure if it's a viable method, since i create a list of every tile entity of my type and then send a packet to player for each one. Won't it cause a bit large traffic on join? Other than that seems to work perfectly.
  • Log in or sign up to reply to this thread