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

Solved Spawn a Human with skin

Discussion in 'Development' started by fevio, Aug 14, 2020.

  1. fevio

    fevio Spider Jockey

    Messages:
    33
    I have tried ti spawn a human:

    $Human = new Human($nbt, $level);
    $Human ->spawnToAll();

    The problem Is this error:must have a valid skin set

    I have tried $Human->setSkin($player->getSkin());
    $Human->sendSkin() but Say:e
    must have a valid skin set.
    Advice?
     
  2. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    Ok, i think you must use LibSkin. its better and easier :p
    its my idea, you are not forced to do it.
     
  3. RicardoMilos384

    RicardoMilos384 Slime

    Messages:
    82
    GitHub:
    ricardomilos384
    Try this
    $nbt->setTag($player->namedtag->getCompoundTag("Skin"));
     
    fevio likes this.
  4. fevio

    fevio Spider Jockey

    Messages:
    33
    Thanks It work
     
  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.