To reproduce:
Download the below datapack
Attempt to shift-click a nether wart block into a stonecutter
-> See that it doesn't work, but when you put it in normally, it does work.
Linked issues
relates to 1
Attachments
Comments 2
This issue is due to the stonecutter container checking if the ingredient item is in an immutable list when transferring slot. If it's not, shift clicking will not work.
Code involved in the issue (19w11b, Fabric-yarn mappings):
public class StonecutterContainer extends Container {
static final ImmutableList<Item> field_17626;
...
public ItemStack transferSlot(PlayerEntity playerEntity_1, int int_1) {
ItemStack itemStack_1 = ItemStack.EMPTY;
Slot slot_1 = (Slot)this.slotList.get(int_1);
if (slot_1 != null && slot_1.hasStack()) {
ItemStack itemStack_2 = slot_1.getStack();
Item item_1 = itemStack_2.getItem();
itemStack_1 = itemStack_2.copy();
...
else if (field_17626.contains(item_1)) {
if (!this.insertItem(itemStack_2, 0, 1, false)) {
return ItemStack.EMPTY;
}
...
}
return itemStack_1;
}
...
static {
field_17626 = ImmutableList.of(Items.STONE, Items.SANDSTONE, Items.RED_SANDSTONE, Items.QUARTZ_BLOCK, Items.COBBLESTONE, Items.STONE_BRICKS, Items.BRICKS, Items.NETHER_BRICKS, Items.RED_NETHER_BRICKS, Items.PURPUR_BLOCK, Items.PRISMARINE, Items.PRISMARINE_BRICKS, new Item[]{Items.DARK_PRISMARINE, Items.ANDESITE, Items.POLISHED_ANDESITE, Items.GRANITE, Items.POLISHED_GRANITE, Items.DIORITE, Items.POLISHED_DIORITE, Items.MOSSY_STONE_BRICKS, Items.MOSSY_COBBLESTONE, Items.SMOOTH_SANDSTONE, Items.SMOOTH_RED_SANDSTONE, Items.SMOOTH_QUARTZ, Items.END_STONE, Items.END_STONE_BRICKS, Items.SMOOTH_STONE});
}
}
Additionally, items with no recipes can be shift-clicked in if they would be in vanilla. To see this, disable the vanilla data pack and try to shift-click in a stone item. It will work despite there being no recipes