Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/mybuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build

on:
push:
branches:
- '1.21'
- '1.21.[1-9]'
- '1.21.1[0-9]'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@main
with:
submodules: true

- name: Setup Java
uses: actions/setup-java@main
with:
distribution: temurin
java-version: 21

- name: Build Annotation Processor
run: |
pushd ./mixin-plugin/annotation-processor
chmod +x ./gradlew
./gradlew build
popd

- name: Build Forge
run: |
pushd ./forge
chmod +x ./gradlew
./gradlew build
popd

- name: Build Fabric
run: |
pushd ./fabric
chmod +x ./gradlew
./gradlew build
popd

- name: Build NeoForge
run: |
pushd ./neoforge
chmod +x ./gradlew
./gradlew build
popd

- name: Create CurseForge builds
shell: pwsh
run: |
Get-ChildItem ./forge/build/libs/*.jar | ./scripts/ConvertTo-CurseForgeBuild.ps1
Get-ChildItem ./fabric/build/libs/*.jar | ./scripts/ConvertTo-CurseForgeBuild.ps1
Get-ChildItem ./neoforge/build/libs/*.jar | ./scripts/ConvertTo-CurseForgeBuild.ps1

- name: Upload Forge artifacts
uses: actions/upload-artifact@main
with:
name: forge
path: ./forge/build/libs/*.jar
compression-level: 0
if-no-files-found: error

- name: Upload Fabric artifacts
uses: actions/upload-artifact@main
with:
name: fabric
path: ./fabric/build/libs/*.jar
compression-level: 0
if-no-files-found: error

- name: Upload NeoForge artifacts
uses: actions/upload-artifact@main
with:
name: neoforge
path: ./neoforge/build/libs/*.jar
compression-level: 0
if-no-files-found: error
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public class Profiles implements Module {
public static final Profiles instance = new Profiles();

private static final long WRITE_FILE_DELAY = 15 * 1_000_000_000L;
private static final String OLD_CONFIG_FILE_NAME = "zergatulcheatutils.json";
private static final String PROFILE_CONFIG_FILE_NAME = "cheatutils-profile.json";
private static final String DEFAULT_CONFIG_FILE_NAME = "cheatutils.json";
private static final String CONFIG_FILE_NAME = "cheatutils.%s.json";
private static final String OLD_CONFIG_FILE_NAME = "ChatTools.json";
private static final String PROFILE_CONFIG_FILE_NAME = "ChatTools-profile.json";
private static final String DEFAULT_CONFIG_FILE_NAME = "ChatTools.json";
private static final String CONFIG_FILE_NAME = "ChatTools.%s.json";

private final Logger logger = LogManager.getLogger(Profiles.class);
private final char[] invalidChars = new char[] { '\\', '/', ':', '*', '?', '"', '<', '>', '|' };
private final Pattern pattern = Pattern.compile("^cheatutils\\.(.+)\\.json$");
private final Pattern pattern = Pattern.compile("^ChatTools\\.(.+)\\.json$");
private String current;
private volatile boolean isInResetState = false;

Expand Down Expand Up @@ -272,4 +272,4 @@ private void migration1() {
}

public record ProfileConfig(String name) {}
}
}