Open SuperMartijn642 opened 2 hours ago
Just noticed that the same issue is present for removing facades with the wrench item in GameEvents#onRightClick
. The facades are only removed for the server and player removing the facade. Other players on the server do not get notified that the facade is removed.
When a player right clicks the facade item, the right click method is called once on the client and once on the server. If the facade can be placed according to the client, it is put into the client's map of facades during the call on the client. If the facade can be placed according to the server, it is placed in the server world's map of facades during the call on the server.
The placing is not send to other clients, thus players other than the player placing the facade are not able to see the placed facades until they rejoin the server.
Ideally, the check to see whether a facade can be placed would only be done server-side and if the facade is placed, it should then be synced to the clients nearby. This would also avoid a situation where the client and server disagree on whether a facade could be placed.