[SPIGOT-5589] Shift-clicking a custom item set in PrepareItemCraftEvent doesn't create the right amount of items Created: 19/Feb/20 Updated: 20/Feb/20 Resolved: 20/Feb/20 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Anky Y | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | crafting, event, spigot |
Issue Links: |
|
||||||||
Version: | CraftBukkit git-Spigot-c574e08-918061b | MC 1.15.2 | API 1.15.2-R0.1-SNAPSHOT | ||||||||
Guidelines Read: | Yes |
Description |
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 |
Comments |
Comment by md_5 [ 19/Feb/20 ] |
This event is not designed for changing crafting recipes, the recipe API is |