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

How i send EntityEventPacket

Discussion in 'Development' started by byyEmirhanWSD, Jun 16, 2018.

  1. byyEmirhanWSD

    byyEmirhanWSD Witch

    Messages:
    50
    GitHub:
    EmirhanWSD
    Hello guys. I try send EntityEventPacket. But it dont send.
    My code;
    PHP:
    $pk = new EntityEventPacket();
            
    $pk->entityRuntimeId Entity::$entityCount++;
            
    $pk->event EntityEventPacket::CONSUME_TOTEM;
            
    $pk->data 0;
            
    $player->dataPacket($pk);
    Anybody help me?
     
  2. Pab45O

    Pab45O Spider Jockey

    Messages:
    37
    GitHub:
    Pab450
    PHP:
            $EidOfMyEntity $player->getId();

            
    $pk = new EntityEventPacket();
            
    $pk->entityRuntimeId $EidOfMyEntity
            
    $pk->event EntityEventPacket::CONSUME_TOTEM;
            
    $pk->data 0;
            
    $player->dataPacket($pk);
     
  3. byyEmirhanWSD

    byyEmirhanWSD Witch

    Messages:
    50
    GitHub:
    EmirhanWSD
    Thanks bro. Its worked. But it only add totem particle. Dont come totem my screen.
     
  4. Pab45O

    Pab45O Spider Jockey

    Messages:
    37
    GitHub:
    Pab450
    can it be necessary to have the object in hand? I do not know how this kind of thing works, I can not help you on that .. if you want to get something on the screen of the player trying to make appear the head of a guardian? EntityEventPacket::ELDER_GUARDIAN_CURSE
     
  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.