The bug
When renaming more than 1 item in an anvil in survival, the output will always be 1.
[media]Code analysis
In 1.11.2, net.minecraft.inventory.ContainerRepair.updateRepairOutput()
sets the output to 1 if the item is not a name tag.
ItemStack itemstack1 = itemstack.copy();
if (itemstack1.getCount() > 1 && !this.player.capabilities.isCreativeMode && !(itemstack1.getItem() instanceof ItemNameTag))
{
itemstack1.setCount(1);
}
Linked issues
is duplicated by 1
relates to 1
Comments 2
The main use for renaming stacks of items are for large sorting systems so that you don't have to use a common item that could break the system. Creating a sorting system that sorts 100 or more items already takes a tremendous amount of these despite being cheap to rename. Multiplying that cost by 64 will make it extremely expensive and force most to revert back to using a common item for sorting. All this will accomplish is making sorting systems more frustratingly vulnerable, it sure won't make them go away. I'm not aware of any other mainstream uses for renaming stacks that would warrant making this change. Even if this is a deliberate change hopefully there can be a compromise to renaming stacks for a much more reasonable cost?
This appears to have been a deliberate change.
Code was added to intentionally achieve a 1 output result.
Likely to handle the case of renaming stacks of 64 being a little overpowered to just cost 1, but scaling cost is ineffective due to the cap.