Tile entities

Discussion in 'Plugin Development' started by Bone008, Jul 8, 2011.

Thread Status:
Not open for further replies.
  1. So I just recently came across Tile entities (I'm not going to go into the "why" or "how", because it would cause lots of OT again) or rather their function in the Server/Client-communication.

    What I know so far is that they are basically additional data for a specific coordinate that is stored in the map-folder.
    But they don't seem to be sent to the client, since so far their only client-side use was for sign texts, and those are handled through the UpdateSign-packet.
    Icons of Monster Spawners aren't even working in SMP, and the rest is only server-side.

    Now my question is: How do Tile entities affect rendering in the client? E.g. I'd like to understand how the piston-animation is working (moving pistons/blocks are Tile entities).
    So there is the TileEntityPiston that stores the progress of the animation and so on.

    Now how is the client told those informations? I am aware that it renders the movement by itself, but how does it know there IS a movement?

    And please don't tell me how it does not work ...

    Thank you :confused:

    No one who knows this? It's all got to do with the PISTON_MOVING_PIECE-material, which actually is the block type that the tile entity is attached to.
    I've got the decompiled server and client but I just can't figure out how the movement is triggered ...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  2. Offline

    Zeerix

    The progress is stored as tile entity. And yes, they are sent to the client.

    There are other tile entities than signs and piston-blocks send to the client: Chests and Furnaces.
     
  3. I'm aware that they somehow need to be sent to the client. The question is how?
    Signs and Blocks that contain items all have their own packet, but pistons don't.
    It looks like it has to do with the PISTON_MOVING_PIECE block id.
    But how does it work?

    I'm having the decompiled server and client, but I can't get an overview over the communication that happens.
     
  4. Offline

    Zeerix

  5. @Zerrix Seriously, I looked at the Protocol History a couple of days after 1.7 was released, and it then never said anything about changements in 0x36 (and Ctrl + F for piston didn't find anything).
    Thank you, that kinda resolved my problem!
     
  6. Offline

    Zeerix

    I needs some time for those people to find out.
     
Thread Status:
Not open for further replies.

Share This Page