22 public const NETWORK_ID = ProtocolInfo::ADD_VOLUME_ENTITY_PACKET;
24 private int $entityNetId;
27 private string $jsonIdentifier;
28 private string $instanceName;
31 private int $dimension;
32 private string $engineVersion;
41 string $jsonIdentifier,
46 string $engineVersion,
49 $result->entityNetId = $entityNetId;
50 $result->data = $data;
51 $result->jsonIdentifier = $jsonIdentifier;
52 $result->instanceName = $instanceName;
53 $result->minBound = $minBound;
54 $result->maxBound = $maxBound;
55 $result->dimension = $dimension;
56 $result->engineVersion = $engineVersion;
60 public function getEntityNetId() : int{ return $this->entityNetId; }
65 public function getJsonIdentifier() : string{ return $this->jsonIdentifier; }
67 public function getInstanceName() : string{ return $this->instanceName; }
69 public function getMinBound() : BlockPosition{ return $this->minBound; }
71 public function getMaxBound() : BlockPosition{ return $this->maxBound; }
73 public function getDimension() : int{ return $this->dimension; }
75 public function getEngineVersion() : string{ return $this->engineVersion; }
78 $this->entityNetId = $in->getUnsignedVarInt();
79 $this->data =
new CacheableNbt($in->getNbtCompoundRoot());
89 $out->putUnsignedVarInt($this->entityNetId);
90 $out->put($this->data->getEncodedNbt());
91 $out->putString($this->jsonIdentifier);
92 $out->putString($this->instanceName);
96 $out->putString($this->engineVersion);
100 return $handler->handleAddVolumeEntity($this);
static create(int $entityNetId, CacheableNbt $data, string $jsonIdentifier, string $instanceName, BlockPosition $minBound, BlockPosition $maxBound, int $dimension, string $engineVersion,)