mojira.dev
MC-271291

Jukebox duplicates music discs inserted with a higher stack count

When giving the player a music disc with a higher max stack count than default (1) eg. command: (/give @s minecraft:music_disc_13[minecraft:max_stack_size=99] 99) and then inserting the said music disc stack into the jukebox, it copies over the whole stack into the jukebox while only shrinking the stack size of the disc by one. When taking out the disc by right-clicking the jukebox, you duplicate the said stack.

My proposed solution is calling{{ ItemStack.copyWithCount(1)}} instead of {{ItemStack.copy() }}in the RecordItem class in the useOn method when calling the setFirstItem method in JukeboxBlockEntity class. (mojmap)

I have implemented this in a mod form, as I encountered this bug before but it was a none vanilla issue, with the new item component changes, this is an issue that can be run into in a vanilla environment so I felt the need to report this.

Linked issues

Attachments

Comments 2

I can confirm, but this seems to duplicate MC-269686.

Thank you for your report!
We're tracking this issue in MC-269686, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Mayaqq

(Unassigned)

Unconfirmed

(Unassigned)

Bug, Duplication, Jukebox, MusicDisc

1.20.6

Retrieved