From 9d2eb5c9b03300fce2b438d9afc974ee3a1ece08 Mon Sep 17 00:00:00 2001 From: "Us3ful\"-Dev" Date: Sun, 8 Mar 2026 20:18:31 +0100 Subject: Flame not working with oneshot arrow (#856) set on fire before the entity takes damage (while still checking for invulnerability) --- Minecraft.World/Arrow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/Arrow.cpp b/Minecraft.World/Arrow.cpp index ab942aac..f7253ca6 100644 --- a/Minecraft.World/Arrow.cpp +++ b/Minecraft.World/Arrow.cpp @@ -303,16 +303,20 @@ void Arrow::tick() damageSource = DamageSource::arrow(dynamic_pointer_cast(shared_from_this()), owner); } + if(!res->entity->isInvulnerable()) + { + if (isOnFire() && res->entity->GetType() != eTYPE_ENDERMAN) + { + res->entity->setOnFire(5); + } + } + if(res->entity->hurt(damageSource, dmg)) { // Firx for #67839 - Customer Encountered: Bows enchanted with "Flame" still set things on fire if pvp/attack animals is turned off // 4J Stu - We should not set the entity on fire unless we can cause some damage (this doesn't necessarily mean that the arrow hit lowered their health) // set targets on fire first because we want cooked // pork/chicken/steak - if (isOnFire() && res->entity->GetType() != eTYPE_ENDERMAN) - { - res->entity->setOnFire(5); - } if (res->entity->instanceof(eTYPE_LIVINGENTITY)) { -- cgit v1.2.3