Lighting campfire with lighter uses no fuel
MCRusher opened this issue ยท 0 comments
Using the lighter on a campfire uses no fuel and you can light as many campfires as you want infinitely forever.
In this part of the LighterItem.useOn code that, as I understand it, runs for campfires, candles, etc., I think maybe hurtAndBreak does nothing since I don't think the lighter has durability. I could be wrong.
There is also no code on this path that I can see that adjusts fuel unlike the other paths.
I tried to clone it and make changes to check myself but the project won't compile for me because the CDGJEI class doesn't match the file name, so I can't.
Again, I could be wrong but that's what it looks like to me.
level.playSound(player, blockpos, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.4F + 0.8F);
level.setBlock(blockpos, blockstate.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)), 11);
level.gameEvent(player, GameEvent.BLOCK_CHANGE, blockpos);
if (player != null) {
context.getItemInHand().hurtAndBreak(1, player, (p_41303_) -> {
p_41303_.broadcastBreakEvent(context.getHand());
});
}