24    public const NETWORK_ID = ProtocolInfo::CONTAINER_OPEN_PACKET;
 
   27    public int $windowType;
 
   29    public int $actorUniqueId = -1;
 
   34    private static function create(
int $windowId, 
int $windowType, 
BlockPosition $blockPosition, 
int $actorUniqueId) : 
self{
 
   36        $result->windowId = $windowId;
 
   37        $result->windowType = $windowType;
 
   38        $result->blockPosition = $blockPosition;
 
   39        $result->actorUniqueId = $actorUniqueId;
 
   43    public static function blockInv(
int $windowId, 
int $windowType, 
BlockPosition $blockPosition) : 
self{
 
   44        return self::create($windowId, $windowType, $blockPosition, -1);
 
   47    public static function entityInv(
int $windowId, 
int $windowType, 
int $actorUniqueId) : 
self{
 
   48        return self::create($windowId, $windowType, 
new BlockPosition(0, 0, 0), $actorUniqueId);
 
   52        $this->windowId = Byte::readUnsigned($in);
 
   53        $this->windowType = Byte::readUnsigned($in);
 
   54        $this->blockPosition = CommonTypes::getBlockPosition($in);
 
   55        $this->actorUniqueId = CommonTypes::getActorUniqueId($in);
 
 
   59        Byte::writeUnsigned($out, $this->windowId);
 
   60        Byte::writeUnsigned($out, $this->windowType);
 
   61        CommonTypes::putBlockPosition($out, $this->blockPosition);
 
   62        CommonTypes::putActorUniqueId($out, $this->actorUniqueId);
 
 
   66        return $handler->handleContainerOpen($this);