[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: Java Archive File SimpleTest-1.0-SNAPSHOT-sources.jar     Java Archive File SimpleTest-1.0-SNAPSHOT.jar    

 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
at org.bukkit.craftbukkit.v1_9_R1.inventory.CraftInventory.setContents(CraftInventory.java:65)



 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:

  1. Place a brewing stand in the world
  2. Put anything inside
  3. Jump above it
  4. Run /test
Generated at Thu Mar 27 04:22:33 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.