Unbreakable flint and steels are completely consumed when igniting a creeper
The fix for MC-257875 which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via
/give @s flint_and_steel[unbreakable={}]
and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here in the Paper repository.
Linked Issues
is duplicated by2
Created Issue:
Unbreakable flint and steel are completely consumed when igniting a creeper
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here in the Paper repository.
Unbreakable flint and steelarecompletely consumed when igniting a creeperUnbreakable flint and steel is completely consumed when igniting a creeper
Unbreakable flint and steeliscompletely consumed when igniting a creeperUnbreakable flint and steels are completely consumed when igniting a creeper
relates to
is duplicated by
is duplicated by
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel{Unbreakable:1b}and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here in the Paper repository.
The fix for
MC-257875which was to add a check to see if the itemstack had a damageable item failed to take into account the "Unbreakable" nbt tag. Currently, if you give yourself an unbreakable flint and steel via/give @s flint_and_steel[unbreakable={}]and ignite a creeper with it in survival mode, the itemstack is completely removed due to the stack size being shrunk by one in Creeper#mobInteract.
The proper fix I believe is shown here in the Paper repository.
Relates to MC-264285
This is already tracked in MC-264285
Thank you for your report!
We're tracking this issue in MC-264285, 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.
Thank you for your report!
We're tracking this issue in MC-264285, 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.
Can confirm this in 1.20.1
The following code analysis below is inefficient for any future updates, please regard to the paper fix.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.20.1 using MCP-Reborn.
As reported by the OP, the ItemStack is being shrunken because ItemStack#isDamageableItem determines if it can be damaged (durability) or it is unbreakable. But, it never checks if the max itemstack is greater than one. Thus consuming the unbreakable flint and steel.
Fix:
This simple fix, checks if the itemstack used has a great stack size than 1, if so, then we should consume the itemstack used.
That is not a good fix. There are items that should be consumed and only have a stack size of 1, but are also not damageable. The correct fix is to change that conditional to instead check if them stack's item type has durability. If it does not have durability, consume the item, if it does, run the hurtAndBreak logic which has its own check for "Unbreakable". You can see how we fixed this issue on Paper.
Confirmed!
You're right, I completely forgot about optimizing the condition for any future ignitable items, the paper commit does fix the issue at hand. I've updated my comment to divert to the proper fix for the minecraft bug.
Can confirm in 1.20.4
Can confirm this is in 1.21 as well
Can confirm in 1.21.2
xinghe, the latest version is 1.21.3. Despite there being minimal differences, please confirm for the latest version.