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

Add item into crafting grid slots

Discussion in 'Development' started by EndermannbugZJFC, Apr 9, 2020.

  1. EndermannbugZJFC

    EndermannbugZJFC Slime

    Messages:
    84
    GitHub:
    endermanbugzjfc
    Is there any way to set or add an item to the player inventory crafting grids? Because I tried to but the item won't show and after you close the inventory it appears at your hotbar. Please help, thanks you guys.
    PHP:
    $item Item::get(95,0,1);
    $player->getCraftingGrid()->setItem(0$item);
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
  3. EndermannbugZJFC

    EndermannbugZJFC Slime

    Messages:
    84
    GitHub:
    endermanbugzjfc
  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.