Broadcasting UpdateBlock packet - 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: Broadcasting UpdateBlock packet (/thread-1326.html) |
Broadcasting UpdateBlock packet - Taugeshtu - 01-23-2014 Hi there. I was wondering if there's any way I could re-send an UpdateBlock packet to all players in specific world. Problem I'm having is rather "special": I'm moving a block with a piston which doesn't exist, so client freaks out (corrupts block's meta). And even though I am explicitly setting this block to a specific meta it seems to me that client doesn't want to update it in its memory. I managed to "fix" it through "SendBlockTo", but now that I thought about it - other players' clients would freak out too, so I'll have to use that function on them as well... Which doesn't seems very nice, since a lot of them could be far, far away from the block of interest. So, if there isn't any way to do this with current API I'd like such a function to be writted and exported, and it would be nice if it would check for block being within player's view distance. RE: Broadcasting UpdateBlock packet - xoft - 01-23-2014 You could simply send the "SendBlockTo" packet to ALL players in the world, they say the client survives receiving block updates for blocks outside its loaded chunks. RE: Broadcasting UpdateBlock packet - Taugeshtu - 01-24-2014 Already doing that... Well, I suppose it's a tradeoff between traffic and perfomance which doesn't really change anything |