Skip to content

Commit

Permalink
fix: compile errors (#957)
Browse files Browse the repository at this point in the history
* fix: compile errors

* chore: run a build in PRs

* chore: rename CI action for PRs

* fix: compile error in FisherMachine

* chore: suppress deprecation warnings for processing array in GTMachines

* chore: revert previous commit as it didn't seem to change anything...

* chore: store PR build output artifacts
  • Loading branch information
mikerooni committed Mar 23, 2024
1 parent 548797f commit b2c6a2b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
arguments: build

- name: Upload Artifact
uses: actions/[email protected]
with:
name: build output
path: build/libs/*
retention-days: 30
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b2c6a2b

Please sign in to comment.