Inspirations

Inspirations

14M Downloads

Client Desync When Placing Block Against Front Of Bookshelf

ChloeDawn opened this issue ยท 3 comments

commented

You are always returning true for the client in BlockBookshelf#onBlockActivated, then returning false on the server if tile entity interaction returns false (i.e not clicking on a designated item slot). So the client never gets told if a block is going to be placed, which results in a desync between the blockstate on the client and server until a block update is triggered. This issue is most noticeable with bookshelves placed against bookshelves, due to the tile entity dependent models.

Mod version: 0.1.1b

Recording of issue:

recording gif

commented

Huh, I thought I always had true on both sides. I'll fix that sometime soon.

commented

I'd personally handle the front of the interaction in the block and not the tile entity. You can check the hitvec and return false if it's not over a valid slot position. Then just always return true if it is over a valid slot position regardless of if the tile entity exists.

commented

Fixed in 0.1.2