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: Mon, 28 Feb 2022 08:46:13 -0600
|
|
Subject: [PATCH] Don't send fire packets if player has Fire Resistance
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index dfd1f37757af1bd808cc2e2d8bf97123adf638bb..7fcb2ecae7ec9a457e00a6a3ea1fb7b589360e02 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -781,7 +781,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;
|