mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Store ender chest viewer count on the tile, instead of relying on the inventory's viewer count (#4238)
Fixes #4021
This commit is contained in:
@ -53,6 +53,7 @@ class EnderChest extends Transparent{
|
||||
if($player instanceof Player){
|
||||
$enderChest = $this->pos->getWorld()->getTile($this->pos);
|
||||
if($enderChest instanceof TileEnderChest and $this->getSide(Facing::UP)->isTransparent()){
|
||||
$enderChest->setViewerCount($enderChest->getViewerCount() + 1);
|
||||
$player->setCurrentWindow(new EnderChestInventory($this->pos, $player->getEnderInventory()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user