HimbeersaftLP / LibSkin

Virion for working with player skins & PocketMine plugin for stealing other player's skins
GNU Lesser General Public License v3.0
27 stars 8 forks source link

Some skins aren't being converted from file #3

Closed rjworks closed 3 years ago

rjworks commented 3 years ago

Some skins like https://namemc.com/skin/d2b16e21751ae051

turn into a black skin after converting it from png file.


            $skinData = SkinConverter::imageToSkinDataFromPngPath($path."skin.png );
            $nbt->setTag( new CompoundTag( "Skin", [
                "Data" => new StringTag( "Data", $skinData ),
                "Name" => new StringTag( "Name", "name" ),
                "CapeData" => new StringTag("CapeData", "capeData")
            ] ) );
        } catch ( Exception $exception ) {
            $this->getLogger()->warning( "Error while loading skin: " . $exception->getMessage() );
        }```
HimbeersaftLP commented 3 years ago

Fixed by #4