mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
33 lines
1.7 KiB
Diff
33 lines
1.7 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/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index 0c0ef8705a8a2f7e96c84f380a43fdc48abdb1e3..8fcc1223942114f46c36028326e9c7daf4f0d9e0 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -886,7 +886,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;
|