Compare commits
6 Commits
createairf
...
36942712f1
Author | SHA1 | Date | |
---|---|---|---|
36942712f1 | |||
fd5ef6c9f7 | |||
82e8b27221 | |||
8a31930866 | |||
a1b720f918 | |||
30cdf291a6 |
@ -1,5 +1,8 @@
|
|||||||
name: build
|
name: build
|
||||||
on: [ pull_request, push ]
|
on:
|
||||||
|
pull_request: {}
|
||||||
|
push: {}
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -9,14 +12,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: https://git.bitheaven.ru/actions/checkout@v2
|
||||||
|
|
||||||
- name: setup jdk ${{ matrix.java }}
|
- name: setup jdk ${{ matrix.java }}
|
||||||
uses: actions/setup-java@v1
|
uses: https://git.bitheaven.ru/actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: https://git.bitheaven.ru/actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
@ -32,7 +35,7 @@ jobs:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|
||||||
- name: capture build artifacts
|
- name: capture build artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: https://git.bitheaven.ru/actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Artifacts
|
name: Artifacts
|
||||||
path: build/libs/
|
path: build/libs/
|
||||||
|
@ -10,8 +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("GITHUB_RUN_NUMBER")
|
String buildNumber = System.getenv("GITEA_RUN_NUMBER")
|
||||||
String buildNumber = 4
|
|
||||||
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -25,7 +25,7 @@ public class CreateAirFabric implements ModInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean airQualityActivatesHelmet(LivingEntity entity) {
|
public static boolean airQualityActivatesHelmet(LivingEntity entity) {
|
||||||
final var air = AirHelper.getO2LevelFromLocation(entity.getEyePosition(), entity.level()).getFirst();
|
final AirQualityLevel air = AirHelper.getO2LevelFromLocation(entity.getEyePosition(), entity.level()).getFirst();
|
||||||
return air == AirQualityLevel.RED || air == AirQualityLevel.YELLOW;
|
return air == AirQualityLevel.RED || air == AirQualityLevel.YELLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
package ru.bitheaven.createairfabric.mixin;
|
package ru.bitheaven.createairfabric.mixin;
|
||||||
|
|
||||||
import fuzs.thinair.helper.AirHelper;
|
|
||||||
import fuzs.thinair.helper.AirQualityLevel;
|
|
||||||
import net.minecraft.tags.TagKey;
|
import net.minecraft.tags.TagKey;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.level.material.Fluid;
|
import net.minecraft.world.level.material.Fluid;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
import ru.bitheaven.createairfabric.CreateAirFabric;
|
import ru.bitheaven.createairfabric.CreateAirFabric;
|
||||||
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
|
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
|
||||||
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
|
||||||
|
|
||||||
@Mixin(DivingHelmetItem.class)
|
@Mixin(DivingHelmetItem.class)
|
||||||
public abstract class DivingHelmetItemMixin {
|
public abstract class DivingHelmetItemMixin {
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user