Solved Setting recipe & result in workbench

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

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

    Desle

    Hi,

    I'm trying to create a new craftingtable inventory and set it's matrix (recipe/ingredients) + the result.
    Whenever I set only the result, it shows, but when I try set the matrix and result, only the matrix shows. The result still works when you click on it, but it does not display the item in the result slot. Would I need to use NMS, or .. ?


    EDIT:
    I finally have it working;

    Code:
            Inventory inventory = Bukkit.createInventory(null, InventoryType.WORKBENCH, "Some inventory");
          
            inventory.setItem(1, this.ingredients[0]);
            inventory.setItem(2, this.ingredients[1]);
            player.openInventory(inventory);
            inventory.setItem(0, this.result);
     
    Last edited: May 24, 2017
Thread Status:
Not open for further replies.

Share This Page