Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-142082

Missing generic inventory types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 19w11a
    • Minecraft 19w02a, Minecraft 19w03c, Minecraft 19w04a, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w09a
    • Confirmed

      Since Minecraft 19w02a the size of an inventory is no longer transmitted in the open inventory packet. The inventory size is now inferred by the client based on the inventory type. The problem is that there is no possibility to open 9x1, 9x2, 9x4 and 9x5 chest inventories, because they do not have a dedicated type. Previously this was possible with setting the size field in the open inventory packet accordingly.

      Why this matters

      Afaik this will not cause any issues in vanilla Minecraft. I am aware of this.

      However most of the custom server software (at least Spigot) supports opening inventories with the previously named sizes. Many plugins do use this feature and would break with Minecraft 1.14 and/or would have to be updated.

      I did notice this issue while updating ViaVersion to 19w02a, where this an even bigger issue. This plugin adds support for newer clients on older servers on a protocol level. Inventories with a size of e.g. 9x1 would be very hard to handle in ViaVersion.

      To reproduce

      The lack of such inventory types can be confirmed by checking the registries report data generator.

      1. Generate the report by running java -cp minecraft_server.19w08b.jar net.minecraft.data.Main --reports
      2. Open generated/reports/registries.json
      3. Find minecraft:menu (near the bottom)
      4. Observe that the only generic menus that exist are minecraft:generic_9x3 (e.g. small chest), minecraft:generic_9x6 (e.g. large chest), and minecraft:generic_3x3 (e.g. dispenser); generic_9x1 and similar do not exist.

      Solution

      The solution to this issue should be fairly easy and would help the Minecraft server community a lot. Just register minecraft:generic_9x1, minecraft:generic_9x2, etc. to the minecraft:menu registry as inventories with the according sizes.

            boq [Mojang] Bartosz Bok
            Gerrygames Gero Cammans
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: