diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml new file mode 100644 index 0000000000..1f0f86dd92 --- /dev/null +++ b/.github/workflows/build-on-push.yml @@ -0,0 +1,39 @@ +name: build-on-push + +on: + pull_request: + paths: ['src/**', '**.gradle', 'gradle.properties', 'gradlew**', 'gradle/**'] + +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} + GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build + uses: gradle/gradle-build-action@v2.4.2 + with: + arguments: build + + - name: Upload Artifact + uses: actions/upload-artifact@v4.0.0 + with: + name: build output + path: build/libs/* + retention-days: 30 diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 6b4c3ed506..eb50981ce8 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -414,10 +414,11 @@ public class GTMachines { .editableUI(ItemCollectorMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id("item_collector"), ItemCollectorMachine.getINVENTORY_SIZES()[tier])) .renderer(() -> new WorkableTieredHullMachineRenderer(tier,GTCEu.id("block/machines/item_collector"))) .tooltips( - Component.translatable("gtceu.machine.item_collector.tooltip") - Component.translatable("gtceu.machine.item_collector.gui.collect_range",(int)Math.pow(2,tier+2)) - Component.translatable("gtceu.universal.tooltip.voltage_in", GTValues.V[tier], GTValues.VNF[tier]) - Component.translatable("gtceu.universal.tooltip.energy_storage_capacity", GTValues.V[tier] * 64L)) + Component.translatable("gtceu.machine.item_collector.tooltip"), + Component.translatable("gtceu.machine.item_collector.gui.collect_range", (int) Math.pow(2, tier + 2)), + Component.translatable("gtceu.universal.tooltip.voltage_in", GTValues.V[tier], GTValues.VNF[tier]), + Component.translatable("gtceu.universal.tooltip.energy_storage_capacity", GTValues.V[tier] * 64L) + ) .compassNode("item_collector") .register(), LV, MV, HV, EV); diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/FisherMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/FisherMachine.java index 17f5f88631..da0544661a 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/FisherMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/FisherMachine.java @@ -236,7 +236,9 @@ private void updateHasWater(){ } public void fishingUpdate() { - if(this.getOffsetTimer() % maxProgress) updateHasWater(); + if(this.getOffsetTimer() % maxProgress == 0L) + updateHasWater(); + if(!hasWater) return; drainEnergy(false);