21 public const NETWORK_ID = ProtocolInfo::CONTAINER_OPEN_PACKET;
24 public int $windowType;
26 public int $actorUniqueId = -1;
31 private static function create(
int $windowId,
int $windowType,
BlockPosition $blockPosition,
int $actorUniqueId) :
self{
33 $result->windowId = $windowId;
34 $result->windowType = $windowType;
35 $result->blockPosition = $blockPosition;
36 $result->actorUniqueId = $actorUniqueId;
40 public static function blockInv(
int $windowId,
int $windowType,
BlockPosition $blockPosition) :
self{
41 return self::create($windowId, $windowType, $blockPosition, -1);
44 public static function entityInv(
int $windowId,
int $windowType,
int $actorUniqueId) :
self{
45 return self::create($windowId, $windowType,
new BlockPosition(0, 0, 0), $actorUniqueId);
49 $this->windowId = $in->getByte();
50 $this->windowType = $in->
getByte();
56 $out->putByte($this->windowId);
57 $out->putByte($this->windowType);
59 $out->putActorUniqueId($this->actorUniqueId);
63 return $handler->handleContainerOpen($this);