mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2026-01-04 15:31:45 +00:00
45 lines
2.8 KiB
Diff
45 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Wed, 30 Nov 2022 14:39:27 +0100
|
|
Subject: [PATCH] Hide flames on entities with fire resistance
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"Don't send fire packets if player has Fire Resistance"
|
|
By: Cryptite <cryptite@gmail.com>
|
|
As part of: Slice (https://github.com/Cryptite/Slice)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 23350a4046a4071ef87f65b7341572a2bff0e8eb..4f8bd45ac7278f06d9af82d6d3e0882cfc830929 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -934,7 +934,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
|
|
this.checkBelowWorld();
|
|
if (!this.level().isClientSide) {
|
|
+ // Gale start - Slice - hide flames on entities with fire resistance
|
|
+ if (this instanceof net.minecraft.world.entity.LivingEntity livingEntity) {
|
|
+ this.setSharedFlagOnFire(this.remainingFireTicks > 0 && (!this.level.galeConfig().gameplayMechanics.hideFlamesOnEntitiesWithFireResistance || !livingEntity.hasEffect(net.minecraft.world.effect.MobEffects.FIRE_RESISTANCE)));
|
|
+ } else {
|
|
+ // Gale end - Slice - hide flames on entities with fire resistance
|
|
this.setSharedFlagOnFire(this.remainingFireTicks > 0);
|
|
+ } // Gale - Slice - hide flames on entities with fire resistance
|
|
}
|
|
|
|
this.firstTick = false;
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 19115238d0fd845a788446d88d9ec9a52762c367..5d499e77800466210473e36b2355873807b9f86a 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -127,6 +127,7 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
|
|
public boolean arrowMovementResetsDespawnCounter = true; // Gale - Purpur - make arrow movement resetting despawn counter configurable
|
|
public double entityWakeUpDurationRatioStandardDeviation = 0.2; // Gale - variable entity wake-up duration
|
|
+ public boolean hideFlamesOnEntitiesWithFireResistance = false; // Gale - Slice - hide flames on entities with fire resistance
|
|
public boolean tryRespawnEnderDragonAfterEndCrystalPlace = true; // Gale - Pufferfish - make ender dragon respawn attempt after placing end crystals configurable
|
|
|
|
}
|