From a07d8b58642eb9161479dcb3a285ad9979a74d2c Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Tue, 30 Nov 2021 21:44:02 +0800 Subject: fix wrong Arrays being used in assline datasticks Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> --- src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java index f35f1962d1..62238a8112 100644 --- a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java +++ b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java @@ -2,6 +2,7 @@ package gregtech.api.util; import static gregtech.GT_Mod.GT_FML_LOGGER; +import java.util.Arrays; import java.util.HashMap; import cpw.mods.fml.common.FMLCommonHandler; @@ -14,7 +15,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; import net.minecraftforge.fluids.FluidStack; -import scala.actors.threadpool.Arrays; public class GT_AssemblyLineUtils { @@ -159,7 +159,7 @@ public class GT_AssemblyLineUtils { for (GT_Recipe_AssemblyLine aRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { if (aRecipe.mEUt == aEU && aRecipe.mDuration == aTime) { if (GT_Utility.areStacksEqual(aOutputs[0], aRecipe.mOutput, true)) { - if (Arrays.equals(aRecipe.mInputs, aInputs) && Arrays.equals(aRecipe.mFluidInputs, aFluidInputs)) { + if (Arrays.equals(aRecipe.mInputs, aInputs) && Arrays.equals(aRecipe.mFluidInputs, aFluidInputs)) { // Cache it String aRecipeHash = generateRecipeHash(aRecipe); sRecipeCacheByRecipeHash.put(aRecipeHash, aRecipe); -- cgit From bda74ad7cb364e02965aac66cd6b08554fd53a3b Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Tue, 30 Nov 2021 22:21:59 +0800 Subject: add test (sort of) to prevent issues like this again Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> --- .github/test-scala-presence.toml | 2 ++ .github/workflow/gradle.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/test-scala-presence.toml create mode 100644 .github/workflow/gradle.yml diff --git a/.github/test-scala-presence.toml b/.github/test-scala-presence.toml new file mode 100644 index 0000000000..ae0e9acd49 --- /dev/null +++ b/.github/test-scala-presence.toml @@ -0,0 +1,2 @@ +[exclude] +"src/main/java/**/*.java" = "import scala." \ No newline at end of file diff --git a/.github/workflow/gradle.yml b/.github/workflow/gradle.yml new file mode 100644 index 0000000000..bffb3d2b1b --- /dev/null +++ b/.github/workflow/gradle.yml @@ -0,0 +1,34 @@ +name: Build Project + +on: + push: + branches: [ experimental ] + pull_request: + branches: [ experimental ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + - name: Build with Gradle + run: ./gradlew build + + test-scala-presence: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check + uses: mattsb42-meta/not-grep@1.0.0 + with: + config-file: ./.github/test-scala-presence.toml \ No newline at end of file -- cgit