28 private float $current,
29 private float $defaultMin,
30 private float $defaultMax,
31 private float $default,
32 private array $modifiers
35 public function getId() : string{ return $this->id; }
37 public function getMin() : float{ return $this->min; }
39 public function getMax() : float{ return $this->max; }
41 public function getCurrent() : float{ return $this->current; }
43 public function getDefaultMin() : float{ return $this->defaultMin; }
45 public function getDefaultMax() : float{ return $this->defaultMax; }
47 public function getDefault() : float{ return $this->default; }
55 $min = $in->getLFloat();
64 for($j = 0, $modifierCount = $in->
getUnsignedVarInt(); $j < $modifierCount; $j++){
65 $modifiers[] = AttributeModifier::read($in);
68 return new self($id, $min, $max, $current, $defaultMin, $defaultMax, $default, $modifiers);
72 $out->putLFloat($this->min);
73 $out->putLFloat($this->max);
74 $out->putLFloat($this->current);
75 $out->putLFloat($this->defaultMin);
76 $out->putLFloat($this->defaultMax);
77 $out->putLFloat($this->
default);
78 $out->putString($this->
id);
81 foreach($this->modifiers as $modifier){
82 $modifier->write($out);
__construct(private string $id, private float $min, private float $max, private float $current, private float $defaultMin, private float $defaultMax, private float $default, private array $modifiers)