Movecraft icon indicating copy to clipboard operation
Movecraft copied to clipboard

Playerside sign update

Open Intybyte opened this issue 1 year ago • 5 comments

Describe in detail what your pull request accomplishes

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

Related issues:

  • Fixes #671

Checklist

  • [ ] Tested
  • [ ] Performance tested

Intybyte avatar Aug 20 '24 16:08 Intybyte

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

TylerS1066 avatar Aug 24 '24 13:08 TylerS1066

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

Intybyte avatar Aug 24 '24 14:08 Intybyte

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).

TylerS1066 avatar Aug 24 '24 17:08 TylerS1066

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.

oh-noey avatar Aug 30 '24 16:08 oh-noey

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() (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

Intybyte avatar Aug 30 '24 16:08 Intybyte