[MC-4923] Flint and steel and fire charges can place fire at invalid positions Created: 18/Dec/12  Updated: 30/Jan/18  Resolved: 23/Jan/18

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w02a, Snapshot 13w04a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.2, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w36b, Minecraft 13w37b, Minecraft 1.7.4, Minecraft 14w11b, Minecraft 14w27b, Minecraft 14w28a, Minecraft 1.8-pre2, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.8.9, Minecraft 16w05b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w36a, Minecraft 16w38a, Minecraft 16w39b, Minecraft 16w39c, Minecraft 16w40a, Minecraft 16w41a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w48a, Minecraft 18w02a
Fix Version/s: Minecraft 17w48a, Minecraft 18w05a

Type: Bug
Reporter: FireHunterX Assignee: Maria Lemón
Resolution: Fixed Votes: 17
Labels: fire, flint_and_steel, use-item

Attachments: PNG File 2015-04-19_20.00.31_4.png    
Issue Links:
Duplicate
is duplicated by MC-8202 invinsible 1 tick farmland fire Resolved
is duplicated by MC-9695 lighter works on wall Resolved
is duplicated by MC-13338 Flint and steel lighting bug Resolved
is duplicated by MC-14820 Using Flint&Steel in an unusable plac... Resolved
is duplicated by MC-30477 Client fire flashes Resolved
is duplicated by MC-43018 Sand Lighting Glitch Resolved
is duplicated by MC-60633 Create single-frame flying fire using... Resolved
is duplicated by MC-68914 Flint And Steel Cant Light The Side O... Resolved
is duplicated by MC-1370 Using Flint and Steel on non-ignitabl... Resolved
is duplicated by MC-1658 If you burn one side of the block, fo... Resolved
Relates
relates to MC-57939 Wrong Orientation for fire created on... Resolved
relates to MC-105591 Flint and Steel loses durability and ... Resolved
relates to MC-122651 Flint and steel no longer creates fir... Resolved
relates to MC-124649 Nether portals can no longer be activ... Resolved
relates to MC-4438 Items dropped on unburnable blocks tu... Resolved
relates to MC-8232 Dispensers and Flint & Steel Resolved
relates to MC-31346 When you light a cobblestone wall, it... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

The bug

Flint and steel places fire at invalid positions, for example on the side of non-inflammable blocks like stone which causes the fire block to disappear the next time it is updated.

How to reproduce

  1. Right click with a flint and steel on a side of block that can't normally catch on fire (Stone for example).
  2. The fire block will appear for a tick.

Note: The fire does not set any entities at the position on fire.

Code analysis

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason for this is that the fire block is actually created. However, the public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) method of the net.minecraft.block.BlockFire class is called right after it was placed and removes the block as it is at an invalid position.
This could / should be fixed by having the public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) method of the net.minecraft.item.ItemFlintAndSteel class only place a fire block is the position is valid. Other items like the bucket might be affected as well, however currently you can place water and lava on every block so it causes no problems.

/**
 * Called when a Block is right-clicked with this Item
 *  
 * @param pos The block being right-clicked
 * @param side The side being right-clicked
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    pos = pos.offset(side);

    if (!playerIn.func_175151_a(pos, side, stack))
    {
        return false;
    }
    else
    {
        // Changed this
        //if (worldIn.getBlockState(pos).getBlock().getMaterial() == Material.air)
        if (worldIn.getBlockState(pos).getBlock().getMaterial() == Material.air && Blocks.fire.canPlaceBlockAt(worldIn, pos))
        {
            worldIn.playSoundEffect((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
            worldIn.setBlockState(pos, Blocks.fire.getDefaultState());
        }

        stack.damageItem(1, playerIn);
        return true;
    }
}
Notes
  • A similar fix would be needed for the fire_charge item and also for the net.minecraft.init.Bootstrap.registerDispenserBehaviors for these items.
  • This fix does not include the use of these items at invalid locations to activate a Nether portal, which could then be moved from net.minecraft.block.BlockFire.onBlockAdded(World, BlockPos, IBlockState) to the respective methods when using an item to create a fire block.


 Comments   
Comment by user-f2760 (Inactive) [ 12/Jan/18 ]

As of 18w02a it no longer creates a fire block (it seems), but still triggers observers and BUD pistons.

Comment by user-f2760 (Inactive) [ 03/Dec/17 ]

Not fixed for fire charges, they have the same problem.

Comment by [Helper] Michał [ 28/Nov/17 ]

@FVbico I will report that tho. This maybe was a bug based feature, but used worldwide and accepted as a feature that was removed since 17w48a. I can only ask mods to not closing it and leaving it for devs to look at our-gamers problem.
New report:
MC-122651

Comment by [Mod] violine1101 [ 27/Nov/17 ]

Please re-read jirauser71590's comment, he never said that reports for the current release aren't accepted; he just said that reports for future snapshots and releases aren't accepted before those versions are released, and that the new behaviour is very highly likely most definitely probably certainly intended and won't change.

Also, no off-topic comments anymore here, please.

Comment by Jack [ 27/Nov/17 ]

so 1.12.2 is still worked on? we both know nothing is going to change in 1.12.2 nor is there gonna be a 1.12.3 especially not since snapshots are beeing worked on i just think its realy funny how 1 moderator on this bugtacker usually makes completly false statements , tells ppl to not even bother making reports etc. if we shouldnt report bugs in snapshots why are snapshots beeing made? whats the point of this bugtracker ?

Comment by [Mod] violine1101 [ 27/Nov/17 ]

@MethodZz That's incorrect, reports for the latest release are always accepted (currently 1.12.2)

Comment by Jack [ 27/Nov/17 ]

so to summ this up: dont make reports about old versions, dont make reports about not released versions and the version thats full release right now counts to old version already bc mojang is already in the snapshot development. I would realy like to know when its appropiate to make any bugreports at all from you FVBico!

Comment by ilmango [ 27/Nov/17 ]

at least provide an intended alternative for this widely used behaviour without any downsides.

Comment by user-f2760 (Inactive) [ 27/Nov/17 ]

No don't make reports for versions that aren't even released yet, and don't bother after the snapshot is released either. The fix will be the intended behavior, so if you report it, it will be resolved as works as intended really fast.

Comment by [Helper] Michał [ 27/Nov/17 ]

Up to now flint and steel was used to update observers manually, but since that fix it won't work. I think that fixing 1-tick fire as bug destroys feature of manual activating observers by flint and steel without placing block. This is used by many youtubers and players. Should I report a new bug with future version affected?

Comment by Alexander [ 21/Oct/16 ]

Sorry I was only looking at the comments not the versions.

Comment by SunCat [ 21/Oct/16 ]

Litargirio, it was already marked as affected

Comment by Alexander [ 21/Oct/16 ]

Confirmed for 16w42a

Comment by Marcono1234 [ 25/Jul/16 ]
  1. In case you are talking about a full block on which the fire can stay, no. But I don't think that this is a bug anyways.
  2. Currently it happens also when you are no fire block could be placed. Place for example a fence on a block and right click the top of the block below the fence. I might create a report for that. It is now MC-105591
  3. Yes. For new slime block contraptions people could have a full cube block diagonally below the piston. My personal favourite would be to have the class BlockPistonBase override the method net.minecraft.block.Block.onBlockActivated(World, BlockPos, IBlockState, EntityPlayer, EnumHand, ItemStack, EnumFacing, float, float, float) to notify the block itself. Then the player could update the piston by clicking with any item that does not interact with the block or is not used, or if the player is not holding an item.
Comment by Fabian Röling [ 24/Jul/16 ]

1. Is this the same bug as when clicking on the top of a non-flammable block?
2. Is the usage of one durability point when doing that also a bug?
3. Would fixing this bug prevent people from causing block updates with flint and steel e.g. on slime block machines?

Comment by SunCat [ 14/Apr/16 ]

Still in 16w15b

Comment by SunCat [ 07/Apr/16 ]

Still in 1.9.2

Comment by SunCat [ 12/Mar/16 ]

Still in 1.9.1-pre3

Comment by SunCat [ 05/Mar/16 ]

Confirmed for 1.9

Comment by Marcono1234 [ 18/Feb/16 ]

Please link to this comment in the description of the report.

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason for this is that the fire block is actually created. However, the public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) method of the net.minecraft.block.BlockFire class is called right after it was placed and removes the block as it is at an invalid position.
This could / should be fixed by having the public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) method of the net.minecraft.item.ItemFlintAndSteel class only place a fire block is the position is valid. Other items like the bucket might be affected as well, however currently you can place water and lava on every block so it causes no problems.

/**
 * Called when a Block is right-clicked with this Item
 *  
 * @param pos The block being right-clicked
 * @param side The side being right-clicked
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    pos = pos.offset(side);

    if (!playerIn.func_175151_a(pos, side, stack))
    {
        return false;
    }
    else
    {
        // Changed this
        //if (worldIn.getBlockState(pos).getBlock().getMaterial() == Material.air)
        if (worldIn.getBlockState(pos).getBlock().getMaterial() == Material.air && Blocks.fire.canPlaceBlockAt(worldIn, pos))
        {
            worldIn.playSoundEffect((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
            worldIn.setBlockState(pos, Blocks.fire.getDefaultState());
        }

        stack.damageItem(1, playerIn);
        return true;
    }
}

Notes:

  • A similar fix would be needed for the fire_charge item and also for the net.minecraft.init.Bootstrap.registerDispenserBehaviors for these items.
  • This fix does not include the use of these items at invalid locations to activate a Nether portal.
Comment by Immaterialise [ 17/Feb/16 ]

Confirmed for 1.9-pre1

Comment by SunCat [ 05/Feb/16 ]

Still in 16w05b
Also, this can be done in creative.

Comment by [Mod] Sonicwave [ 07/Jan/15 ]

Confirmed for 1.8.2-pre1.

Comment by [Mod] Sonicwave [ 25/Nov/14 ]

Still in 1.8.1. Strangely, this does not occur with fire charges.

Comment by [Mod] Sonicwave [ 12/Sep/14 ]

Still in 1.8.

Comment by [Mod] Sonicwave [ 28/Aug/14 ]

Confirmed for 1.8-pre2.

Comment by Marcono1234 [ 10/Jul/14 ]

Confirmed for 14w28a

Also somehow with dispensers: MC-8232

Comment by Sam Bone [ 05/Jul/14 ]

Confirmed for 14w27b.

Comment by [Mod] Ezekiel (ezfe) [ 24/Feb/14 ]

Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by FireHunterX [ 18/Dec/12 ]

You can set the top of a non-flammable block on fire, not the side. Fire will appear if you right-click the top of the block, but it won't if you click on the side.

I'm talking about when you right click the side.

Comment by Wesley [ 18/Dec/12 ]

I don't think this is a bug. I'm pretty sure that flash of fire is how a nether portal knows it needs to be lit.

Generated at Sun Jan 12 12:06:12 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.