29 private const TAG_PRIMARY =
"primary";
30 private const TAG_SECONDARY =
"secondary";
32 private int $primaryEffect = 0;
33 private int $secondaryEffect = 0;
36 $nbt->setInt(self::TAG_PRIMARY, $this->primaryEffect);
37 $nbt->
setInt(self::TAG_SECONDARY, $this->secondaryEffect);
40 public function readSaveData(
CompoundTag $nbt) : void{
42 $this->primaryEffect = $nbt->getInt(self::TAG_PRIMARY, 0);
43 $this->secondaryEffect = $nbt->getInt(self::TAG_SECONDARY, 0);
47 $nbt->setInt(self::TAG_PRIMARY, $this->primaryEffect);
48 $nbt->
setInt(self::TAG_SECONDARY, $this->secondaryEffect);
51 public function getPrimaryEffect() : int{ return $this->primaryEffect; }
53 public function setPrimaryEffect(
int $primaryEffect) : void{ $this->primaryEffect = $primaryEffect; }
55 public function getSecondaryEffect() : int{ return $this->secondaryEffect; }
57 public function setSecondaryEffect(
int $secondaryEffect) : void{ $this->secondaryEffect = $secondaryEffect; }