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

PlayerInteractEvent

Discussion in 'Development' started by Teamblocket, Apr 14, 2017.

  1. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    How can i set a spawner to like blaze spawner using PlayerInteractEvent?
     
  2. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    you can just use an blaze egg...
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you need similar procedure like spawning a tile as same as chest
    that's all as far as i know
     
  4. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    no tested:
    PHP:
    if($event->getItem()->getId() === 52){
             
    $tile $event->getPlayer()->getLevel()->getTile($event->getBlock());
             if(
    $tile instanceof MobSpawner){
                
    $tile->setEntityId(43);
             }
         }
     
    OnTheVerge 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.