[SPIGOT-1645] Wrong size for custom brewing inventories Created: 02/Mar/16 Updated: 03/Mar/16 Resolved: 03/Mar/16 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | José Roberto de Araújo Júnior | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | 1.9, bukkit, inventory, spigot | ||
| Attachments: |
|
| Description |
|
It's a simple issue, the InventoryType.BREWING is still defining that brewers have 4 inventory slots instead of 5. Minecraft added a fuel slot to brewing stand on 1.9. This makes impossible to change the fuel in custom inventories of this type. If we attempt to copy the inventories from a real brewing stand it will also fail because the custom inventory size is 4. customBrewingInventory.setContents(realBrewingInventory.getContents()); java.lang.IllegalArgumentException: Invalid inventory size; expected 4 or less |
| Comments |
| Comment by md_5 [ 03/Mar/16 ] |
|
Thanks for the test plugin. |
| Comment by Morphan1 [ 03/Mar/16 ] |
|
This also happens with player inventories. It expects 36 but there's 37 now due to offhand. |
| Comment by José Roberto de Araújo Júnior [ 02/Mar/16 ] |
|
I attached a simple plugin to demonstrate. To execute the test:
|