Skip to content

Commit

Permalink
Merge pull request #2 from Connor-Colenso/master
Browse files Browse the repository at this point in the history
r
  • Loading branch information
Connor-Colenso authored Aug 18, 2024
2 parents b8bb10b + 00986f9 commit 086164f
Show file tree
Hide file tree
Showing 11 changed files with 1,086 additions and 517 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/fullpack_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run Server and Verify

on:
workflow_run:
workflows: ["Build and test"]
types:
- completed

jobs:
run-server:
runs-on: ubuntu-latest

steps:
- name: Download artifacts from Build and test
uses: actions/download-artifact@v4
with:
name: ${{ github.repository_id }}-build-libs
path: build/libs

- name: Download artifacts from the specified run
uses: actions/download-artifact@v4
with:
name: server-new
path: artifacts

- name: Unzip the first level
run: |
mkdir -p extracted1
unzip artifacts/server-new.zip -d extracted1
- name: Unzip the second level
run: |
mkdir -p extracted2
unzip extracted1/server-new.zip -d extracted2
- name: Modify eula.txt
run: |
sed -i 's/eula=false/eula=true/' extracted2/eula.txt
- name: Move JARs to mods folder
run: |
mkdir -p extracted2/mods
cp build/libs/*.jar extracted2/mods/
- name: Run the server
run: |
cd extracted2
chmod +x ./startserver-java9.sh
./startserver-java9.sh &
SERVER_PID=$!
# Wait for 4 minutes to ensure the server runs correctly
sleep 240
# Check if the server is still running
if ps -p $SERVER_PID > /dev/null; then
echo "Server is running successfully."
exit 0
else
echo "Server has crashed or failed."
exit 1
fi
- name: Clean up
if: always()
run: |
kill $SERVER_PID || true
14 changes: 7 additions & 7 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@
dependencies {
api("com.github.GTNewHorizons:StructureLib:1.3.4:dev")
api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.6.22-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.6.26-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughIds:2.1.0:dev")
api("com.github.GTNewHorizons:GTNHLib:0.4.2:dev")
api("com.github.GTNewHorizons:GTNHLib:0.4.3:dev")
api("com.github.GTNewHorizons:ModularUI:1.2.0:dev")
api("com.github.GTNewHorizons:ModularUI2:2.1.1-1.7.10:dev")
api("com.github.GTNewHorizons:waila:1.8.1:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-426-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.21-gtnh:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-430-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.24-gtnh:dev")
api('com.github.GTNewHorizons:Yamcl:0.6.0:dev')

compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.10.1:dev')
compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.4.1-GTNH:dev")
compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.4.2-GTNH:dev")
compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.6:dev")
implementation('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false}
// Required to prevent an older bauble api from Extra Utilities from loading first in the javac classpath
Expand Down Expand Up @@ -80,11 +80,11 @@ dependencies {
compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.2:dev") { transitive = false }
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.42:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Botania:1.11.3-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:Botania:1.11.5-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:HoloInventory:2.4.12-GTNH:dev') { transitive = false }
compileOnly rfg.deobf("curse.maven:extra-utilities-225561:2264384")
compileOnly rfg.deobf('curse.maven:minefactory-reloaded-66672:2366150')
compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.19-GTNH:dev") {transitive = false}
compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.20-GTNH:dev") {transitive = false}
// https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels
compileOnlyApi rfg.deobf('curse.maven:advsolar-362768:2885953')
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev') {transitive = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2533,25 +2533,25 @@ public void run() {
new GT_MetaTileEntity_Hatch_InputData(
OpticalSlaveConnector.ID,
"hatch.datain.tier.07",
"Optical Slave Connector",
"Optical Reception Connector",
7).getStackForm(1L));
dataOut_Hatch.set(
new GT_MetaTileEntity_Hatch_OutputData(
OpticalMasterConnector.ID,
"hatch.dataout.tier.07",
"Optical Master Connector",
"Optical Transmission Connector",
7).getStackForm(1L));
dataInAss_Hatch.set(
new GT_MetaTileEntity_Hatch_InputDataItems(
AssemblylineSlaveConnector.ID,
"hatch.datainass.tier.07",
"Assembly line Slave Connector",
"Assembly line Reception Connector",
7).getStackForm(1L));
dataOutAss_Hatch.set(
new GT_MetaTileEntity_Hatch_OutputDataItems(
DataBankMasterConnector.ID,
"hatch.dataoutass.tier.07",
"Data Bank Master Connector",
"Data Bank Transmission Connector",
7).getStackForm(1L));
dataOut_Wireless_Hatch.set(
new GT_MetaTileEntity_Hatch_WirelessComputation_Output(
Expand All @@ -2569,13 +2569,13 @@ public void run() {
new GT_MetaTileEntity_Hatch_WirelessInputDataItems(
WirelessAssemblylineSlaveConnector.ID,
"hatch.datainass.wireless.tier.12",
"Wireless Assembly line Slave Connector",
"Wireless Assembly line Reception Connector",
12).getStackForm(1L));
dataOutAss_Wireless_Hatch.set(
new GT_MetaTileEntity_Hatch_WirelessOutputDataItems(
WirelessDataBankMasterConnector.ID,
"hatch.dataoutass.wireless.tier.12",
"Wireless Data Bank Master Connector",
"Wireless Data Bank Transmission Connector",
12).getStackForm(1L));
rack_Hatch.set(
new GT_MetaTileEntity_Hatch_Rack(ComputerRack.ID, "hatch.rack.tier.08", "Computer Rack", 8)
Expand Down
29 changes: 19 additions & 10 deletions src/main/java/gregtech/api/enums/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.IllegalFormatException;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
Expand Down Expand Up @@ -3230,19 +3231,27 @@ public String toString() {
}

public String getDefaultLocalizedNameForItem(String aFormat) {
return String.format(
aFormat.replace("%s", "%temp")
.replace("%material", "%s"),
this.mDefaultLocalName)
.replace("%temp", "%s");
try {
return String.format(
aFormat.replace("%s", "%temp")
.replace("%material", "%s"),
this.mDefaultLocalName)
.replace("%temp", "%s");
} catch (IllegalFormatException ignored) {
return aFormat;
}
}

public String getLocalizedNameForItem(String aFormat) {
return String.format(
aFormat.replace("%s", "%temp")
.replace("%material", "%s"),
this.mLocalizedName)
.replace("%temp", "%s");
try {
return String.format(
aFormat.replace("%s", "%temp")
.replace("%material", "%s"),
this.mLocalizedName)
.replace("%temp", "%s");
} catch (IllegalFormatException ignored) {
return aFormat;
}
}

public boolean hasCorrespondingFluid() {
Expand Down
Loading

0 comments on commit 086164f

Please sign in to comment.