decode($geometryData); if($decodedGeometry === false){ throw new InvalidSkinException("Invalid geometry data (" . json_last_error_msg() . ")"); } /* * Hack to cut down on network overhead due to skins, by un-pretty-printing geometry JSON. * * Mojang, some stupid reason, send every single model for every single skin in the selected skin-pack. * Not only that, they are pretty-printed. * TODO: find out what model crap can be safely dropped from the packet (unless it gets fixed first) */ $geometryData = json_encode($decodedGeometry); } $this->skinId = $skinId; $this->skinData = $skinData; $this->capeData = $capeData; $this->geometryName = $geometryName; $this->geometryData = $geometryData; } public function getSkinId() : string{ return $this->skinId; } public function getSkinData() : string{ return $this->skinData; } public function getCapeData() : string{ return $this->capeData; } public function getGeometryName() : string{ return $this->geometryName; } public function getGeometryData() : string{ return $this->geometryData; } }