Custom mob head not updating immediately - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Custom mob head not updating immediately (/thread-2268.html) |
Custom mob head not updating immediately - Mathias - 12-22-2015 When I set the owner of a mob head with SetOwner, using the function DoWithMobHeadAt, the skin of the head only changes after reconnecting to the server. Can I change this behaviour in any way? RE: Custom mob head not updating immediately - xoft - 12-22-2015 Setting the owner doesn't re-send the metadata to the client. We should add a m_IsMetadataDirty flag to entities and all the Set functions should set it; upon ticking the entity, if the flag is set, the entity should re-send its metadata to the client and reset the flag. Come to think of it, I'm not sure if the protocol supports re-sending the entity metadata, though. It might be that the metadata is sent only with the "create entity" packet, so we'd have to effectively destroy and recreate the entity. |