APDevTeam / Movecraft

The original movement plugin for Paper. Reloaded. Again.
GNU General Public License v3.0
121 stars 76 forks source link

Playerside sign update #697

Open Intybyte opened 4 weeks ago

Intybyte commented 4 weeks ago

Describe in detail what your pull request accomplishes

Use a bukkit method to force the player to update the signs instead

Related issues:

Checklist

TylerS1066 commented 3 weeks ago

I ran a test and this does not fully work yet. It's better than before (without any update packets), but not fully working.

Intybyte commented 3 weeks ago

not fully working. What do you mean with not fully working? like sometimes it works sometimes it doesn't?

TylerS1066 commented 3 weeks ago

What do you mean with not fully working? like sometimes it works sometimes it doesn't?

Correct, it worked some of the time but not all. I didn't try it for long, but there didn't seem to be a pattern (I was just cruising a ship a bit and sometimes the sign would update, sometimes not).

oh-noey commented 2 weeks ago

the api you're using is marked as deprecated in recent javadoc, which could signal why its broken. Try using the alternative method they recommend instead.

Intybyte commented 2 weeks ago

the api you're using is marked as deprecated in recent javadoc, which could signal why its broken. Try using the alternative method they recommend instead.

Ok just read the java docs

Use sendBlockUpdate(Location, TileState) by creating a new virtual Sign block state via [BlockData.createBlockState()](https://jd.papermc.io/paper/1.21.1/org/bukkit/block/data/BlockData.html#createBlockState()) (constructed e.g.

I will try using the suggested method, I hope the createBlockState() calls aren't as expensive as the original server update call otherwise it would be a waste of time