43 public static function create(array $values, ?
float $unknownFloat, ?
Vector3 $unknownVector3,
string $biomeIdentifier, GraphicsOverrideParameterType $parameterType,
bool $reset) : self{
45 $result->values = $values;
46 $result->unknownFloat = $unknownFloat;
47 $result->unknownVector3 = $unknownVector3;
48 $result->biomeIdentifier = $biomeIdentifier;
49 $result->parameterType = $parameterType;
50 $result->reset = $reset;
70 $count = VarInt::readUnsignedInt($in);
71 for($i = 0; $i < $count; ++$i){
72 $this->values[] = ParameterKeyframeValue::read($in);
74 $this->unknownFloat = CommonTypes::readOptional($in, LE::readFloat(...));
75 $this->unknownVector3 = CommonTypes::readOptional($in, CommonTypes::getVector3(...));
76 $this->biomeIdentifier = CommonTypes::getString($in);
77 $this->parameterType = GraphicsOverrideParameterType::fromPacket(Byte::readUnsigned($in));
78 $this->reset = CommonTypes::getBool($in);
82 VarInt::writeUnsignedInt($out, count($this->values));
83 foreach($this->values as $value){
86 CommonTypes::writeOptional($out, $this->unknownFloat, LE::writeFloat(...));
87 CommonTypes::writeOptional($out, $this->unknownVector3, CommonTypes::putVector3(...));
88 CommonTypes::putString($out, $this->biomeIdentifier);
89 Byte::writeUnsigned($out, $this->parameterType->value);
90 CommonTypes::putBool($out, $this->reset);