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

Empty itemstacks no longer get created with the correct defaults

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21.1, 24w34a
    • None
    • Plausible
    • Commands, Items

      Previously ItemStack.EMPTY used new ItemStack((Item) null); which returned AirItem which had the same defaults as all other Item's, however during the change to components ItemStack.EMPTY was changed to use new ItemStack((Void)null) which create a AirItem with DataComponentMap.EMPTY for it's components which leads it's default stack size and stats to be what is specified in the getOrDefault, this seems like a oversight and it should be initalized with DataComponents.COMMON_ITEM_COMPONENTS instead properly giving it the defaults it should get.

            Unassigned Unassigned
            IThundxr IThundxr
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: