mojira.dev

IThundxr

Assigned

No issues.

Reported

MC-275894 Empty itemstacks no longer get created with the correct defaults Invalid MC-268130 Fences in lava room of Nether Fortresses placed using "/place" fail to connect to the sides Confirmed MC-217812 Redstone Doesnt travel down some blocks Duplicate

Comments

Righto,

private ItemStack(@Nullable Void lvt1) {
        this.item = null;
        this.components = new PatchedDataComponentMap(DataComponentMap.EMPTY);
    }

This is the constructor used for ItemStack#EMPTY, it should be initialized with the default components since for as long as i know it was intended that even empty item stacks would have a max stack size of the default 64, this likely causes issues anywhere minecraft grabs from the component or calls getMaxStackSize since instead of getting 64 for a empty item it now gets 1, not to mention this also causes issues for mods which assumed the same thing, albeit mods being less important here, the simplest change would be replacing new PatchedDataComponentMap(DataComponentMap.EMPTY); with DataComponents.COMMON_ITEM_COMPONENTS;, that way it'll only default to 1 if a item purposely removes the max stack size component or is initialized without it.

Reproduction steps aren't needed, i've explained the issue, which is that ItemStack.EMPTY should be initalized with DataComponents.COMMON_ITEM_COMPONENTS instead of DataComponentMap.EMPTY, previously even empty itemstacks had a size of 64 but since 1.20.5 they no longer do, this skews up calculations where you expect empty item stacks to have a max stack size of 64 as they should but in reality they don't because of a regression in 1.20.5.

as shown in the slime pic slime blocks are considered TRANSPARENT which means if this was a WAI bug redstone should not have been going down the slime

added snapshot 21w08b as it affects it as well which is the moss block

MC-3311 is a very old bug report which is about 1.4 redstone has changed since than