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

Show nametag when invisible

Discussion in 'Development' started by Nora1903, Jul 31, 2018.

  1. Nora1903

    Nora1903 Slime

    Messages:
    82
    GitHub:
    cuongvnz
    Are there any ways to set invisible for an living entity but its nametag still visible ?, thanks
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Haven't tested it but try
    PHP:
    $entity->setInvisible(true);
    $entity->setNameTagAlwaysVisible(true);
     
    corytortoise likes this.
  3. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    No, you can't. Mojang broke this in 1.2.
     
    OnTheVerge likes this.
  4. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    There is only one way to do that. Make an invisible entity and setScale to 0.0000000000000000000001. Then teleport to the player on the move event.
     
  5. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    "Only one way" would be an overstatement, and I don't think the client will like that scale.

    A safer method would be to spawn a floating text particle above the player which reads their nametags.
     
  6. Nora1903

    Nora1903 Slime

    Messages:
    82
    GitHub:
    cuongvnz
    I use entity in order to moving it , so the name tag is moving to
     
  7. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    I thought those were bugged too. Sorry but it is awhile since I played Minecraft PE last time.
     
  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.