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

Solved Custom Crafting (ALPHA-10)

Discussion in 'Development' started by Daniktheboss, Dec 28, 2017.

  1. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Hey, so here the problem
    PHP:
    $recipe = new ShapedRecipeItem::get(1,0,5), ["aax""aax""xxx"], [
          
    "a" => Item::get(2,0,1),
          
    "x" => Item::get(0,0,1)
        ]);
        
    $this->getServer()->getCraftingManager()->registerRecipe($recipe);
    Everything loads up nicely, but when i try to craft somthing
    Code:
    [11:09:22] [Server thread/DEBUG]: Unhandled inventory action from daniktheboss: Fake container pocketmine\inventory\BigCraftingGrid for daniktheboss does not contain Item Grass (2:0)x15
    [11:09:22] [Server thread/DEBUG]: Unhandled InventoryTransactionPacket received from daniktheboss: 0x1e00000002000003041e00000000043c000000009f8d06c70100041e0000000000
    Any help?
     
  2. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    I don’t thnik you can
     
  3. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    If you have nothing to comment. Leave your nooby comments to yourself.
     
  4. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Okie
     
  5. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    You can use the space character to indicate air items, instead of specifying it as an actual ingredient. That's probably the issue.
     
  6. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Same error...:(
     
  7. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Bump ^
     
  8. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    try this instead
    Code:
    $recipe = new ShapedRecipe(Item::get(1,0,5), ["aa", "aa"], [
          "a" => Item::get(2,0,1)
    ]);
    
     
  9. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Works :shoghi: Thanks
     
    iiFlamiinBlaze and dktapps like 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.