Little temperature fix

This commit is contained in:
bitheaven 2023-11-04 03:34:51 +05:00
parent d730a9a3a5
commit fcb3263aa4
1 changed files with 2 additions and 4 deletions

View File

@ -1,7 +1,5 @@
package ru.bitheaven.createastrafabric.mixin;
import com.simibubi.create.content.equipment.armor.BacktankUtil;
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
import earth.terrarium.ad_astra.common.config.AdAstraConfig;
import earth.terrarium.ad_astra.common.entity.system.EntityTemperatureSystem;
import earth.terrarium.ad_astra.common.item.armor.NetheriteSpaceSuit;
@ -18,8 +16,8 @@ public abstract class EntityTemperatureSystemMixin {
method = "temperatureTick(Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/server/level/ServerLevel;)V")
private static void redirectTemperatureTick(LivingEntity entity) {
boolean createNetherite = true;
createNetherite &= DivingHelmetItem.getWornItem(entity).getItem().isFireResistant();
createNetherite &= BacktankUtil.getAllWithAir(entity).stream().anyMatch(b -> b.getItem().isFireResistant());
createNetherite &= entity.getItemBySlot(EquipmentSlot.HEAD).getItem().isFireResistant();
createNetherite &= entity.getItemBySlot(EquipmentSlot.CHEST).getItem().isFireResistant();
createNetherite &= entity.getItemBySlot(EquipmentSlot.LEGS).is(ModTags.HEAT_RESISTANT)
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem() instanceof NetheriteSpaceSuit
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem().isFireResistant();