1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Skin

Discussion in 'General discussion' started by Blacker845, Apr 5, 2019.

  1. Blacker845

    Blacker845 Creeper

    Messages:
    1
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP

    Attached Files:

    Muqsit likes this.
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    can you convert it to where the skin is like this?
    [​IMG]
     
  4. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    You'd just need to create a new image with the right size and cut those parts together (the outer shell (those headphones) are going to be a tad more difficult though).
     
  5. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Create new image??
     
  6. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Use the System.Drawing API to create a blank image to copy those pixels onto. What are you trying to use this for?
     
  7. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    For website
     
  8. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Unless you want to set up an ASP.NET Core webserver, you probably want to rewrite this in sth like php or node.js (whatever you set up) then.
     
  9. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Do you have any clue how to do that in php
     
  10. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Yes, in fact I even did it a few days ago because I was bored: https://himbeer.me/skin?name=himbeersaftlp
    It reads directly from the <playername.dat> file in the server folder.
    But it has a big problem: The code is baaaaad, like really fucking bad. I wrote the world's worst NBT parser to decode the dat file and then used php-gd to create the image.
    I'm not sure if I should send the code as it's a really bad example and using it could potentially give you security risks and such.
     
  11. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Can't you use player skin data
     
  12. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    My page gets the skin data from the player.dat, so it works even when the server is offline and without depending on PocketMine's API. (as an afterthought, I probably should have used PMMP's NBT Library)
     
    radondev likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.