-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BenBernhardG/1.18.1
1.18.1
- Loading branch information
Showing
13 changed files
with
664 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Validate Gradle Wrapper" | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
validation: | ||
name: "Validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: gradle/wrapper-validation-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Java CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Setup | ||
run: chmod +x gradlew && ./gradlew setup | ||
- name: Build with Gradle | ||
run: chmod +x gradlew && ./gradlew build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
maven { url = 'https://maven.minecraftforge.net' } | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'net.minecraftforge.gradle:ForgeGradle:5+' | ||
} | ||
} | ||
|
||
import net.minecraftforge.forge.tasks.* | ||
|
||
apply plugin: 'eclipse' | ||
apply plugin: 'net.minecraftforge.gradle.patcher' | ||
|
||
println(' Java: ' + System.getProperty('java.version') + | ||
' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ')' + | ||
' Arch: ' + System.getProperty('os.arch')) | ||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
|
||
configurations { | ||
shade | ||
compile.extendsFrom shade | ||
} | ||
|
||
group = 'me.yourname' | ||
version = '1.0.0' | ||
|
||
ext { | ||
minecraft_version = '1.18.1' | ||
mcp_version = '20211210.034407' | ||
mappings_channel = 'official' | ||
mappings_version = '1.18.1' | ||
spi_version = '4.0.10' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'net.minecraftforge:forgespi:' + spi_version | ||
// Use the shade to add the lib to the jar | ||
// or use compile if you want to load the lib from the version.json | ||
// from a maven repo | ||
// shade 'package-here' | ||
// compile 'package-here' | ||
} | ||
|
||
project(':mcp') { | ||
apply plugin: 'net.minecraftforge.gradle.mcp' | ||
mcp { | ||
config = minecraft_version + '-' + mcp_version | ||
pipeline = 'joined' | ||
} | ||
} | ||
|
||
evaluationDependsOn(':mcp') | ||
|
||
patcher { | ||
parent = project(':mcp') | ||
patchedSrc = file('src/main/java') | ||
mappings channel: mappings_channel, version: mappings_version | ||
mcVersion = minecraft_version | ||
} | ||
|
||
jar { | ||
configurations.shade.each { dep -> | ||
from(project.zipTree(dep)) { | ||
exclude 'META-INF', 'META-INF/**' | ||
} | ||
} | ||
} | ||
|
||
task runclient(type: JavaExec) { | ||
group = "MCP" | ||
description = "Runs the client" | ||
classpath sourceSets.main.runtimeClasspath | ||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { | ||
jvmArgs '-XstartOnFirstThread' | ||
} | ||
args '--gameDir', '.' | ||
args '--version', minecraft_version | ||
args '--assetsDir', downloadAssets.output | ||
args '--assetIndex', "1.18" | ||
args '--accessToken', '0' | ||
main 'net.minecraft.client.main.Main' | ||
workingDir 'run' | ||
} | ||
|
||
task setup() { | ||
group = "MCP" | ||
description = "Setups the dev workspace" | ||
dependsOn ':extractMapped' | ||
mkdir 'run/assets' | ||
copy { | ||
from downloadAssets.output.path | ||
into 'run/assets' | ||
} | ||
} | ||
|
||
task copyAssets { | ||
group = "MCP" | ||
description = "Download and place the assets into the run folder" | ||
dependsOn ':downloadAssets' | ||
mkdir 'run/assets' | ||
copy { | ||
from downloadAssets.output.path | ||
into 'run/assets' | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.