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: Tue, 18 Apr 2023 07:50:34 -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 45439b0cc4ea69e409fd41d4684403c0e0feab12..007055909e4f11a6c2805b8118d092e8b6f0a982 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -890,7 +890,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
|
|
this.checkBelowWorld();
|
|
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;
|