From a22276e679b123dacc144f13fff489c33c66a1c9 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 10 Jul 2022 00:19:27 +0100 Subject: [PATCH] there's always one ... --- src/block/utils/CopperTrait.php | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/block/utils/CopperTrait.php diff --git a/src/block/utils/CopperTrait.php b/src/block/utils/CopperTrait.php new file mode 100644 index 000000000..c001657fc --- /dev/null +++ b/src/block/utils/CopperTrait.php @@ -0,0 +1,62 @@ +oxidation = RuntimeEnumDeserializer::readCopperOxidation($r); + $this->waxed = $r->readBool(); + } + + protected function encodeType(RuntimeDataWriter $w) : void{ + RuntimeEnumSerializer::writeCopperOxidation($w, $this->oxidation); + $w->writeBool($this->waxed); + } + + public function getOxidation() : CopperOxidation{ return $this->oxidation; } + + /** @return $this */ + public function setOxidation(CopperOxidation $oxidation) : self{ + $this->oxidation = $oxidation; + return $this; + } + + public function isWaxed() : bool{ return $this->waxed; } + + /** @return $this */ + public function setWaxed(bool $waxed) : self{ + $this->waxed = $waxed; + return $this; + } +}