Skip to content

Commit

Permalink
Backward compability
Browse files Browse the repository at this point in the history
  • Loading branch information
AkmalFairuz committed Sep 21, 2024
1 parent 43f4e82 commit fe3fa49
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/types/inventory/stackrequest/ItemStackRequestSlotInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
use pocketmine\network\mcpe\protocol\types\inventory\FullContainerName;

final class ItemStackRequestSlotInfo{

private FullContainerName $containerName;

public function __construct(
private FullContainerName $containerName,
int $containerId,
private int $slotId,
private int $stackId
){}
){
$this->containerName = new FullContainerName($containerId);
}

public function getContainerId() : int{ return $this->containerName->getContainerId(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
use function count;

final class ItemStackResponseContainerInfo{

private FullContainerName $containerName;

/**
* @param ItemStackResponseSlotInfo[] $slots
*/
public function __construct(
private FullContainerName $containerName,
int $containerId,
private array $slots
){}
){
$this->containerName = new FullContainerName($containerId);
}

public function getContainerId() : int{ return $this->containerName->getContainerId(); }

Expand Down

0 comments on commit fe3fa49

Please sign in to comment.