Don't send fire packets if player has Fire Resistance
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Etil <81570777+etil2jz@users.noreply.github.com>
|
||||
Date: Sun, 10 Oct 2021 19:52:08 +0200
|
||||
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 6abee01345f739b064f280821394e18d96fa9c56..adc89ce8cf50abaceaed433092bd3ef97035fb70 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -787,7 +787,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
||||
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;
|
||||
Reference in New Issue
Block a user