Skip to content

Commit

Permalink
Only set the entity on fire if the entity actually got hurt by the fl…
Browse files Browse the repository at this point in the history
…amethrower #8337
  • Loading branch information
pupnewfster committed Feb 24, 2025
1 parent 6223464 commit 4ff4940
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/mekanism/common/entity/EntityFlame.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ private void smeltBlock(Player shooter, BlockState hitState, BlockPos blockPos,
private void burn(Entity entity) {
if (!(entity instanceof ItemEntity) || MekanismConfig.gear.flamethrowerDestroyItems.get()) {
//Only actually burn the entity if it is not an item, or we allow destroying items
entity.setRemainingFireTicks(SharedConstants.TICKS_PER_SECOND);
entity.hurt(damageSources().thrown(this, getOwner()), DAMAGE);
if (entity.hurt(damageSources().thrown(this, getOwner()), DAMAGE)) {
entity.setRemainingFireTicks(SharedConstants.TICKS_PER_SECOND);
}
}
}

Expand Down

0 comments on commit 4ff4940

Please sign in to comment.