24 lines
1.2 KiB
Diff
24 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Fri, 12 Aug 2022 08:28:40 -0500
|
|
Subject: [PATCH] Don't send fire packets if player has FR
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index f925a8d550ecbf2044a37bfe58b30d6578c5f6af..7e31ac6b1097fc5d4faac98d0f1b5673da4e6694 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -844,7 +844,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
|
|
this.checkOutOfWorld();
|
|
if (!this.level.isClientSide) {
|
|
- this.setSharedFlagOnFire(this.remainingFireTicks > 0);
|
|
+ if (this instanceof net.minecraft.world.entity.LivingEntity livingEntity) {
|
|
+ this.setSharedFlagOnFire(this.remainingFireTicks > 0 && !livingEntity.hasEffect(net.minecraft.world.effect.MobEffects.FIRE_RESISTANCE));
|
|
+ } else {
|
|
+ this.setSharedFlagOnFire(this.remainingFireTicks > 0);
|
|
+ }
|
|
}
|
|
|
|
this.firstTick = false;
|