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

Solved Make Enum

Discussion in 'Development' started by Zoom601, Jul 31, 2017.

  1. Zoom601

    Zoom601 Silverfish

    Messages:
    21
    Hello PMMP Forum!

    I have a proplem!:)
    I try to make Enum like this:
    PHP:
    use pocketmine\nbt\tag\EnumTag;
    use 
    pocketmine\nbt\tag\DoubleTag;

    $m = new EnumTag("Motion", [
    new 
    DoubleTag(" ", -\sin($p->yaw 180 M_PI) * \cos($p->pitch 180 M_PI)),
    new 
    DoubleTag(" ", -\sin($p->pitch 180 M_PI)),
    new 
    DoubleTag(" ", \cos($p->yaw 180 M_PI) * \cos($p->pitch 180 M_PI) )
    ]);
    But it is not working i think because Enum does no exist in pmmp files but is there any way to make working Enum?
     
    Last edited: Jul 31, 2017
  2. Zoom601

    Zoom601 Silverfish

    Messages:
    21
    oh thanks fixed
     
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Enum is now ListTag. This change took place almost 2 years ago, when shoghi was working on updating PMMP to PHP7.
     
    jasonwynn10 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.