Compare commits
No commits in common. "d730a9a3a5bc688b3c75cd6b167aa0aa26f9466a" and "d0c438ebdc1b46b3a2ade1675c8109ecbe62bd76" have entirely different histories.
d730a9a3a5
...
d0c438ebdc
|
@ -10,7 +10,7 @@ targetCompatibility = JavaVersion.VERSION_17
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
String buildNumber = System.getenv("GITEA_RUN_NUMBER")
|
String buildNumber = 2
|
||||||
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
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;
|
|
||||||
import earth.terrarium.ad_astra.common.registry.ModTags;
|
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
|
||||||
|
|
||||||
@Mixin(EntityTemperatureSystem.class)
|
|
||||||
public abstract class EntityTemperatureSystemMixin {
|
|
||||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/ad_astra/common/entity/system/EntityTemperatureSystem;burnEntity(Lnet/minecraft/world/entity/LivingEntity;)V"),
|
|
||||||
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.LEGS).is(ModTags.HEAT_RESISTANT)
|
|
||||||
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem() instanceof NetheriteSpaceSuit
|
|
||||||
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem().isFireResistant();
|
|
||||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.FEET).is(ModTags.HEAT_RESISTANT)
|
|
||||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof NetheriteSpaceSuit
|
|
||||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem().isFireResistant();
|
|
||||||
|
|
||||||
if(!createNetherite) {
|
|
||||||
entity.hurt(entity.damageSources().onFire(), (float) AdAstraConfig.heatDamage);
|
|
||||||
entity.setSecondsOnFire(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,8 +5,7 @@
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"DivingHelmetItemMixin",
|
"DivingHelmetItemMixin",
|
||||||
"EntityOxygenSystemMixin",
|
"EntityOxygenSystemMixin"
|
||||||
"EntityTemperatureSystemMixin"
|
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
"MinecraftMixin",
|
"MinecraftMixin",
|
||||||
|
|
Reference in New Issue