SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Allow sending BlockSnaphots to Viewers

Open Techdaan opened this issue 7 years ago • 7 comments

Currently the Viewer API allows developers to manipulate the world for certain Viewers only, for example using the Viewer.sendBlockChange method. The issue I am running into is that the sendBlockChange method accepts a location and a BlockState, but there is no support for BlockSnapshots.

I cannot send different signs to different players (For example, a sign with the player's name) using BlockStates. If it were possible to send a BlockSnapshot to a player these kind of interactions would be possible.

Techdaan avatar Jan 03 '18 14:01 Techdaan

I'm happy to see this in. it seems like a relatively safe addition?

ryantheleach avatar Jan 03 '18 14:01 ryantheleach

Yes, very safe I imagine. Just may be tricky to implement as updates to tile entities client side may not be reflected from the server.

gabizou avatar Jan 03 '18 19:01 gabizou

This would be very useful for creating personal signs and holograms.

ronaldburns avatar Feb 14 '18 07:02 ronaldburns

This is very cool and would be useful for my Ships plugin. There is a feature where all the blocks of the ship turn to bedrock to you only (so you can see what the tracking system has found) however when reverting back the signs have no text on. So adding this into it the process, it would correct the signs

mosemister avatar Feb 14 '18 11:02 mosemister

Was there a PR attached to this issue, or has/hasn't it been implemented yet?

ronaldburns avatar Feb 15 '18 03:02 ronaldburns

@rojo8399 I haven't made an implementation for this feature, which is why there's no PR attached. I don't think anything has been implemented considering this issue's still open.

Techdaan avatar Feb 15 '18 13:02 Techdaan

Looking at this issue now, I'm looking at how to implement the changes, due to the requirement to create the TileEntity and then have it create the packets and then remove the tile entity without mod issue is somewhat worrisome, but I can give it an attempt with all the vanilla tile entities, and then proceed to try with some modded tile entities.

The issue is that a majority of tile entities have their own update packet management, so telling the client about those updates is sometimes difficult to ensure without issue further down the line.

gabizou avatar May 19 '18 02:05 gabizou