Compare commits

..

1 Commits

Author SHA1 Message Date
bitheaven fcb3263aa4 Little temperature fix 2023-11-04 03:34:51 +05:00
1 changed files with 2 additions and 4 deletions

View File

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