Fire charges aren't consumed when igniting creepers using them in survival or adventure mode
The Bug:
Fire charges won't be consumed when igniting creepers with them in survival or adventure mode.
Differently, while igniting a TNT, the fire charge is consumed.
Steps to Reproduce:
- Obtain a fire charge and switch into survival mode.
- Summon a creeper and use the fire charge on it.
- Take note as to whether or not fire charges are consumed when igniting creepers using them in survival or adventure mode.
Observed Behavior:
The fire charge is not consumed.
Expected Behavior:
The fire charge would be consumed.
Code Analysis:
Code analysis by [Mod] Avoma can be found in this comment.
Created Issue:
Fire charge won't be consumed while igniting a Creeper
Fire charge won't be consumed while igniting a Creeper in survival or adventure mode.
Differently, while igniting a TNT, the fire charge is consumed.
Fire charge won't be consumed while igniting a Creeper in survival or adventure mode.
Differently, while igniting a TNT, the fire charge is consumed.The bug
Fire charge won't be consumed while igniting a Creeper in survival or adventure mode.
Differently, while igniting a TNT, the fire charge is consumed.
To reproduce
- Be in survival mode.
- Summon a creeper.
- Use a fire charge on the creeper.
Expected result
The fire charge is consumed.
Observed result
The fire charge is not consumed.
relates to
The
bugFire charge won't be consumed wh
ile ignitinga Creeper in survival or adventure mode.Differently, while igniting a TNT, the fire charge is consumed.
Toreproduce
Be insurvival mode.- Summon a creeper.
- Use a fire charge on the creeper.
Expected result
The fire charge
isconsumed.
Observed resultThe fire charge is not consumed.
The Bug:
Fire charges won't be consumed when igniting creepers with them in survival or adventure mode.
Differently, while igniting a TNT, the fire charge is consumed.
Steps to Reproduce:
- Obtain a fire charge and switch into survival mode.
- Summon a creeper and use the fire charge on it.
- Take note as to whether or not fire charges are consumed when igniting creepers using them in survival or adventure mode.
Observed Behavior:
The fire charge is not consumed.
Expected Behavior:
The fire charge would be consumed.
Code Analysis:
Code analysis by [Mod] Avoma can be found in this comment.
Fire chargewon'tbeconsumed while ignitinga CreeperFire charges aren't consumed when igniting creepers using them in survival or adventure mode
is duplicated by
relates to
Duplicate of MC-257875.
Thank you for your report!
We're tracking this issue in MC-257875, 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
📓 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.
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.

Here's a code analysis of this issue along with a fix.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.19.3 Release Candidate 3 using Mojang mappings.
If we look at the above class, we can see that when an item that's included within the CREEPER_IGNITERS item tag is used on a creeper, the hurtAndBreak() method is called. This method is specifically and exclusively designed to decrease the durability of an item that can be damaged. Because fire charges don't have durability, this results in them not being consumed when using them on creepers, therefore resulting in this problem occurring.
Fix:
Simply adding some lines of code to call a certain method based on what item players use to interact with creepers, will resolve this problem. When players interact with creepers using flint and steel, the hurtAndBreak() method should be called, and on the other hand, when players interact with creepers using fire charges, the shrink() method should be called.
Wouldn't it make more sense to just modify hurtAndBreak to just consume the item/call shrink if it has no durability? I recon it won't create any other issues, but might prevent future ones.