-
Bug
-
Resolution: Fixed
-
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
-
Confirmed
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
- Right click with a flint and steel on a side of block that can't normally catch on fire (Stone for example).
- 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.
- is duplicated by
-
MC-8202 invinsible 1 tick farmland fire
- Resolved
-
MC-9695 lighter works on wall
- Resolved
-
MC-13338 Flint and steel lighting bug
- Resolved
-
MC-14820 Using Flint&Steel in an unusable place causes it to still "light up" the area
- Resolved
-
MC-30477 Client fire flashes
- Resolved
-
MC-43018 Sand Lighting Glitch
- Resolved
-
MC-60633 Create single-frame flying fire using flint and steel
- Resolved
-
MC-68914 Flint And Steel Cant Light The Side Of Blocks.
- Resolved
-
MC-1370 Using Flint and Steel on non-ignitable blocks should be blocked
- Resolved
-
MC-1658 If you burn one side of the block, for a moment there is light
- Resolved
- relates to
-
MC-57939 Wrong Orientation for fire created on nonflammable block's side
- Resolved
-
MC-105591 Flint and Steel loses durability and fire charge is used up even if no fire was placed
- Resolved
-
MC-122651 Flint and steel no longer creates fire on side of block / cause block update
- Resolved
-
MC-124649 Nether portals can no longer be activated from the side
- Resolved
-
MC-4438 Items dropped on unburnable blocks turn invisible when trying to ignite the block
- Resolved
-
MC-8232 Dispensers and Flint & Steel
- Resolved
-
MC-31346 When you light a cobblestone wall, it turns into a corner piece for a second
- Resolved