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

Spawn A Chest With Items?

Discussion in 'Development' started by Junkdude, Nov 30, 2016.

  1. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
  3. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Not really, he wants to just set a chest with nbt.
     
  4. TutoGamerWalid

    TutoGamerWalid Spider Ban Evader

    Messages:
    11
    GitHub:
    wiligangster
    PHP:
    $tiles $this->getServer()->getLevelByName("yourlevel")->getTile(new Vector3($x,$y,$z));
    if(
    $tiles instanceof Chest) {
    $chest $tiles->getInventory();
    $chest->setItem(1Item::get(id,meta,amount));
     
  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.