Skip to content

Commit

Permalink
Merge branch 'CleanroomMC:main' into i5092
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb authored Oct 27, 2024
2 parents 3cac1ad + b958531 commit 45b916a
Show file tree
Hide file tree
Showing 65 changed files with 1,663 additions and 795 deletions.
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/000-report-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 🐛 Report Bug
description: "Did something not work as expected?"
body:
- type: markdown
attributes:
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
- type: input
id: discord
attributes:
label: Your CleanroomMC Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Fake#1234"
- type: input
id: version
attributes:
label: Cleanroom Version
description: "What version of the Cleanroom are you using?"
placeholder: "Example: 15.24.0.3000"
validations:
required: true
- type: dropdown
id: java
attributes:
label: Java Version
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
options:
- Java 8
- Java 9
- Java 11
- Java 17
- Java 19
- Java 20
- Java 21
- Java 22
- Other (Please Specify)
validations:
required: true
- type: dropdown
id: graphics
attributes:
label: Graphics Card Vendor
description: What graphics card vendor are you using?
options:
- Other (Please Specify)
- NVidia
- AMD/ATI
- Intel iGPU
- AMD iGPU
- Mesa/Software
validations:
required: true
- type: textarea
id: report
attributes:
label: Bug Report
description: "Relevant information, as well as relevant logs attached such as `logs/latest.log` and `logs/debug.log`."
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: textarea
id: modlist
attributes:
label: Mod List
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log)."
placeholder: "List of mods goes here"
validations:
required: true
- type: textarea
id: notes
attributes:
label: MMC Instance Notes
description: "Obtain from Notes sections if using MMC instance pack."
placeholder: "Notes goes here"
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true
- label: "I have read the known incompatibilities and this is not related to one of those."
required: true
- label: "I have installed [Fugue](https://github.com/CleanroomMC/Fugue) and it does not fix this issue."
required: true
- label: "I am using experimental branch and have installed [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1) and it does not fix this issue."
required: true
- label: "I am running a test build from Cleanroom Github Actions. (Or, if I've compiled it myself I plan to fix the issue)"
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/CleanroomMC/Cleanroom/discussions/new?category=draft
about: Please draft a proposal feature here.
52 changes: 41 additions & 11 deletions .github/workflows/BuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ on:
push:
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: Build type
options:
- Stable
- Experimental

run-name: "${{ github.event_name == 'pull_request' && 'Pull Request Build, DO NOT DOWNLOAD' || format('{0}#{1}: {2}', github.ref_name, github.run_number, github.event.commits[0].message)}}"

permissions:
contents: read
Expand All @@ -21,44 +30,65 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
fetch-tags: true
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4.2.1
with:
java-version: '21'
distribution: 'temurin'

- name: Get branch names.
id: branch-names
uses: tj-actions/branch-names@v8

# add more feat here if required
- name: Gather build info
id: vars
run: |
BRANCH_FEAT=$(echo "${{ steps.branch-names.outputs.current_branch }}" | cut -d'/' -f1 | awk '{print tolower($0)}')
if [ "$BRANCH_FEAT" = "experimental" ]; then
echo "BUILD_TYPE=Experimental" >> $GITHUB_OUTPUT
else
echo "BUILD_TYPE=Stable" >> $GITHUB_OUTPUT
fi
- name: Fix Gradle permission
run: chmod +x ./gradlew

- name: Setup Forge env
run: ./gradlew setup
run: ./gradlew setup -Prun_number=${{ github.run_number }}
- name: Stop Gradle daemon
run: ./gradlew --stop

- name: Build Forge Installer Jar
run: ./gradlew installerJar
- name: Build Jars
run: ./gradlew installerJar -Prun_number=${{ github.run_number }}

- name: Get version
run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV

- name: Upload Forge Universal
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.3
with:
name: universal
name: universal-${{ env.CLEANROOM_VERSION }}
path: projects/cleanroom/build/libs/*-universal.jar

- name: Upload Forge Installer
id: upload-job
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.3
with:
name: installer
name: installer-${{ env.CLEANROOM_VERSION }}
path: projects/cleanroom/build/libs/*-installer.jar
if-no-files-found: error

- name: Repository Dispatch
if: success()
if: ${{ success() && github.event_name != 'pull_request' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CLEANROOMMC_DISPATCH_TOKEN }} # require PAT :shrug:
repository: CleanroomMC/CleanroomMMC
event-type: cleanroom_upload_artifact
client-payload: '{"commit_hash": "${{ github.sha }}", "run_job_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
client-payload: '{"commit_hash": "${{ github.sha }}", "run_job_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "branch": "${{ steps.branch-names.outputs.current_branch }}", "build_type": "${{ inputs.environment || steps.vars.outputs.BUILD_TYPE }}", "actor": "${{ github.actor }}", "version": "${{ env.CLEANROOM_VERSION }}"}'
2 changes: 1 addition & 1 deletion .github/workflows/EventHandler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

name: Event Handler
on:
push:
workflow_dispatch:

permissions:
contents: read
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Auto Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
with:
fetch-tags: true
fetch-depth: 0

- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: '21'
distribution: 'temurin'

- name: Fix Gradle permission
run: chmod +x ./gradlew

- name: Setup Forge env
run: ./gradlew setup -Prun_number=${{ github.run_number }} -Prelease=true

- name: Get version
run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV

- name: Stop Gradle daemon
run: ./gradlew --stop

- name: Build Jars
run: ./gradlew installerJar -Prun_number=${{ github.run_number }} -Prelease=true

- name: Stop Gradle daemon again
run: ./gradlew --stop

- name: Publish to maven for mod development
run: ./gradlew publish -PoutlandUsername=${{ secrets.MAVEN_USERNAME }} -PoutlandPassword="${{ secrets.MAVEN_PASSWORD }}" -Prun_number=${{ github.run_number }} -Prelease=true

- name: Checkout CleanroomMMC
uses: actions/[email protected]
with:
repository: CleanroomMC/CleanroomMMC
path: mmc

- name: setup python
uses: actions/[email protected]
with:
python-version: '3.12'

- name: Install script dependencies
run: |
python -m pip install --upgrade pip
pip install -r mmc/requirements.txt
- name: Generate MMC Pack
run: python main.py
working-directory: ./mmc
env:
PATH_TO_EXIST_INSTALLER: ../projects/cleanroom/build/libs/cleanroom-${{ env.CLEANROOM_VERSION }}-installer.jar

- name: Copy MMC Pack
run: cp mmc/build/CleanroomMMC.zip ./projects/cleanroom/build/libs/Cleanroom-MMC-instance-${{ env.CLEANROOM_VERSION }}.zip

- uses: ncipollo/[email protected]
with:
artifacts: "projects/cleanroom/build/libs/*"
generateReleaseNotes: true
10 changes: 5 additions & 5 deletions .github/workflows/WindowsTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4.2.1
with:
java-version: '21'
distribution: 'temurin'
distribution: 'semeru'

- name: Setup Forge env
run: ./gradlew.bat setup
- name: Stop Gradle daemon
run: ./gradlew.bat --stop

- name: Build Forge Installer Jar
run: ./gradlew.bat installerJar
- name: Build Jar
run: ./gradlew.bat build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/buildSrc/.gradle/
/buildSrc/build/
/logs/
version.txt
src/main/java/com/cleanroommc/common/CleanroomVersion.java
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,34 @@
- LWJGL3
- A working *mod development template/kit*
- Patches for loading incompatible mods
- Built-in Mixin
- Built-in Mixin w/ handy bootstrapping
- Develop using Scala 3 + Kotlin 2
- Compatibility to 99% of Forge mods

### Planning

- CleanroomGradle to replace ForgeGradle
- No more Late and Early mixin
- Classfile API
- Scala 3 + Kotlin 2
- Actually useful APIs (See [here](https://github.com/orgs/CleanroomMC/projects/4/))
- Optimized
- Compatibility

## Components:

- Minecraft Coder Pack
- CleanroomLoader (Continuation + Revamp of ForgeModLoader)
- Cleanroom Minecraft (Continuation + Revamp of MinecraftForge)
- Mixin [(Coming Soon)](https://github.com/CleanroomMC/CleanMix)
- Customized Mixin
- Bytecode Patcher (Coming Soon) \[Inspired by [Bansoukou](https://github.com/LoliKingdom/Bansoukou) and [Bytecode Patcher](https://github.com/jbredwards/Bytecode-Patcher)]
- [Fugue](https://github.com/CleanroomMC/Fugue), a mod patches many incompatibilities. (temporary)
- [Fugue](https://github.com/CleanroomMC/Fugue), a mod patches many incompatibilities.
- Javassist
- [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1), a Scala provider. We made Scala libraries become a standalone mod so it can be updated.

## Downloads:
## Download & Installation:

- For MultiMC-based launchers (PolyMC, PrismLauncher), go to CleanroomMMC's [action page](https://github.com/CleanroomMC/CleanroomMMC/actions), download the latest build and import it in your launcher(alternatively unzip patches and json inside to your 1.12 instance).
- For regular launcher (official launcher, AT launcher, FTB, HMCL), go to Cleanroom's [action page](https://github.com/CleanroomMC/Cleanroom/actions), click the latest action marked as **Build and Upload Test Artifact** and download the **installer** artifact. You could use the installer like the Forge one.
- For MultiMC-based launchers (PolyMC, PrismLauncher), download the MMC instance from [release](https://github.com/CleanroomMC/Cleanroom/releases), import it in your launcher(alternatively unzip patches and json inside to your 1.12 instance).
- For regular launcher (official launcher, AT launcher, FTB, HMCL), download the installer jar from release. You could use the installer like the Forge one.
- **Remember to install Fugue!**
- **And Scalar!**

## Build Instructions:

Expand All @@ -52,6 +55,8 @@

There's an unofficial [template](https://github.com/kappa-maintainer/ExampleMod-1.12.2-FG5) exist. Note: You need to build before run.

A porting guide is available in [Cleanroom wiki](https://cleanroommc.com/wiki/cleanroom-mod-development/introduction).

## Roadmap flow chart

```mermaid
Expand Down
Loading

0 comments on commit 45b916a

Please sign in to comment.