Workaround for cursor sync in 1.13+, closes #4059

This commit is contained in:
Dylan K. Taylor 2021-03-07 21:17:52 +00:00
parent 712df04bc4
commit fbb6f1f81c
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -53,4 +53,13 @@ class PlayerCursorInventory extends BaseInventory{
public function getHolder(){
return $this->holder;
}
public function sendContents($target) : void{
//TODO: HACK!
//Since 1.13, this is now part of a larger "UI inventory", and sending contents for this larger inventory does
//not work the way it's intended to. Even if it did, it would be necessary to send all 51 slots just to update
//this one, which is just not worth it.
//This workaround isn't great, but it's at least simple.
$this->sendSlot(0, $target);
}
}