Solved Inventory casting to CraftingInventory

Discussion in 'Plugin Development' started by Desle, May 23, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    Desle

    How do I cast a newly created inventory with the type workbench to CraftingInventory?
     
  2. Offline

    Zombie_Striker

    @Desle
    Don't cast it. Instead, provide the InventoryType.WORKBENCH argument to the createInventory method.
     
  3. Offline

    Desle

    I've done this, although I want to change the ingredients & result. I've tried multiple things so far and none of them seem to be working for me. Or the PrepareItemCraftEvent doesn't trigger, when adding items to the recipe, or the result does not stay and gets replaced by the default result, even when changing it in the prepareItemCraftEvent

    okay, edit;

    I can change the result, but if I also start changed the recipe, the result will get overwritten. Any solutions?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 24, 2017
Thread Status:
Not open for further replies.

Share This Page