Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5589

Shift-clicking a custom item set in PrepareItemCraftEvent doesn't create the right amount of items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit git-Spigot-c574e08-918061b | MC 1.15.2 | API 1.15.2-R0.1-SNAPSHOT
    • Yes

      When setting a custom item in the result during the PrepareItemCraftEvent by calling event.getInventory().setResult(), then shift-clicking the custom item set, the amount of items produced is incorrect.

       

      Example code:

      @EventHandler
      public void prepareItem(PrepareItemCraftEvent e) {
          e.getInventory().setResult(new ItemStack(Material.DIAMOND));
      }
      

      When placing, for example, a stack of Stone, and shift-clicking the Diamond produced, you receive 27 Diamonds instead of 64, but the whole stack of Stone is used. 

            Unassigned Unassigned
            ratquaza Anky Y
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: