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

Solved Tile stays for 1 sec and removes

Discussion in 'Development' started by iCirgio, Jan 14, 2018.

  1. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    Code
    PHP:
       $chest Tile::createTile("Chest"$sender->getLevel(), new CompoundTag("", [ new StringTag("id""Tile::Chest"), new IntTag("x"floor($sender->x)), new IntTag("y"floor($sender->y)), new IntTag("z"floor($sender->x))]));

            
    $block Block::get(Block::CHEST);
            
    $block->$chest->x;
            
    $block->$chest->y;
            
    $block->$chest->z;
            
    $block->level $chest->getLevel();
            
    $block->level->sendBlocks([$sender], [$block]);

           foreach(
    $player->getInventory()->getContents() as $item) {
           
    $chest->getInventory()->addItem($item);
           
    $sender->addWindow($chest->getInventory());
    Basically when I execute command I see the inventory for a split second then it randomly disappears
     
  2. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    Fixed

    Error didn't had spawntoall
     
  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.