Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Living entities now take fire damage #888
This pull request aims to implement fire damage for living entities:
Observed Behavior: Entities would not catch fire when standing in a fire block. Since entities were not being detected in the fire block, fire ticks were not updated and the entity takes zero damage.
Expected Behavior: Entities will catch fire when standing in fire. While standing in fire, the entity will take 1 tick of damage, equivalence of half a heart in-game. Once the entity is no longer standing in fire, they will receive 8 ticks of damage, equivalence of four hearts in-game. If the entity were to enter the fire again, they will continue to take damage and add an additional 8 ticks of fire damage once they exit.
This was implemented in a similar manner as lava damage, checking if the entity is standing in fire and dealing damage to the entity. We must check if the entity is dead or not, that way if they were to die in the fire they do not receive the fire ticks after death. Once exiting the fire if they were previously standing in fire, then their fire ticks will increment by 180.