Cuberite Forum

Full Version: Broadcasting UpdateBlock packet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
Already doing that... Well, I suppose it's a tradeoff between traffic and perfomance which doesn't really change anything Smile