SpongeAPI
SpongeAPI copied to clipboard
Allow sending BlockSnaphots to Viewers
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.
I'm happy to see this in. it seems like a relatively safe addition?
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.
This would be very useful for creating personal signs and holograms.
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
Was there a PR attached to this issue, or has/hasn't it been implemented yet?
@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.
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.