Skip to content

Commit 9d2eb5c

Browse files
authored
Flame not working with oneshot arrow (MCLCE#856)
set on fire before the entity takes damage (while still checking for invulnerability)
1 parent 8ad70cd commit 9d2eb5c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Minecraft.World/Arrow.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,20 @@ void Arrow::tick()
303303
damageSource = DamageSource::arrow(dynamic_pointer_cast<Arrow>(shared_from_this()), owner);
304304
}
305305

306+
if(!res->entity->isInvulnerable())
307+
{
308+
if (isOnFire() && res->entity->GetType() != eTYPE_ENDERMAN)
309+
{
310+
res->entity->setOnFire(5);
311+
}
312+
}
313+
306314
if(res->entity->hurt(damageSource, dmg))
307315
{
308316
// Firx for #67839 - Customer Encountered: Bows enchanted with "Flame" still set things on fire if pvp/attack animals is turned off
309317
// 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)
310318
// set targets on fire first because we want cooked
311319
// pork/chicken/steak
312-
if (isOnFire() && res->entity->GetType() != eTYPE_ENDERMAN)
313-
{
314-
res->entity->setOnFire(5);
315-
}
316320

317321
if (res->entity->instanceof(eTYPE_LIVINGENTITY))
318322
{

0 commit comments

Comments
 (0)