Skip to content

Commit d137027

Browse files
committed
Initial port to 1.20.5
1 parent b66db9e commit d137027

File tree

743 files changed

+8878
-11027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

743 files changed

+8878
-11027
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ "1.20.4" ]
5+
branches: [ "1.20.5" ]
66
pull_request:
7-
branches: [ "1.20.4" ]
7+
branches: [ "1.20.5" ]
88
types:
99
- synchronize
1010
- opened
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/setup-java@v4
3939
with:
4040
distribution: 'temurin'
41-
java-version: 17
41+
java-version: 21
4242

4343
- name: Initialize CodeQL
4444
uses: github/codeql-action/init@v3

.github/workflows/gametests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "Run Game Tests"
22

33
on:
44
push:
5-
branches: [ "1.20.4" ]
5+
branches: [ "1.20.5" ]
66
pull_request:
7-
branches: [ "1.20.4" ]
7+
branches: [ "1.20.5" ]
88
types:
99
- synchronize
1010
- opened
@@ -23,10 +23,10 @@ jobs:
2323
- name: Checkout
2424
uses: actions/checkout@v4
2525

26-
- name: Set up JDK 17
26+
- name: Setup Java
2727
uses: actions/setup-java@v4
2828
with:
29-
java-version: '17'
29+
java-version: 21
3030
distribution: 'temurin'
3131

3232
- name: Build with Gradle

.github/workflows/gradle-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
build/neoForm
5252
~/.gradle
5353
.gradle
54-
- name: Set up JDK 17
54+
- name: Setup Java
5555
uses: actions/setup-java@v4
5656
with:
57-
java-version: '17'
57+
java-version: 21
5858
distribution: 'temurin'
5959
settings-path: ${{ github.workspace }} # location for the settings.xml file
6060

annotation-processor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repositories {
2222
}
2323

2424
dependencies {
25-
implementation "com.blamejared.crafttweaker:CraftTweaker-neoforge-${minecraft_version}:${crafttweaker_version}"
25+
implementation "com.blamejared.crafttweaker:CraftTweaker-neoforge-${previous_minor_minecraft_version}:${crafttweaker_version}"
2626
//Version of GSON used by vanilla (and thus packed and already downloaded)
2727
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
2828
implementation "com.squareup:javapoet:1.13.0"

annotation-processor/src/main/java/mekanism/ComputerMethodProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <p>
2424
* Technically we violate this with the Wrapping methods, but if new methods are added to a wrapper, a manually triggered full rebuild should catch it.
2525
*/
26-
@SupportedSourceVersion(SourceVersion.RELEASE_17)
26+
@SupportedSourceVersion(SourceVersion.RELEASE_21)
2727
@SupportedAnnotationTypes({
2828
MekAnnotationProcessors.ANNOTATION_COMPUTER_METHOD,
2929
MekAnnotationProcessors.ANNOTATION_SYNTHETIC_COMPUTER_METHOD,

annotation-processor/src/main/java/mekanism/MethodFactoryProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Gathering (Gradle) annotation processor which generates a ComputerMethodRegistry for the Factories generated by the {@link ComputerMethodProcessor} processor.
3434
*/
35-
@SupportedSourceVersion(SourceVersion.RELEASE_17)
35+
@SupportedSourceVersion(SourceVersion.RELEASE_21)
3636
@SupportedAnnotationTypes(MekAnnotationProcessors.COMPUTER_METHOD_FACTORY_ANNOTATION_CLASSNAME)
3737
@SupportedOptions(MekAnnotationProcessors.MODULE_OPTION)
3838
public class MethodFactoryProcessor extends AbstractProcessor {

annotation-processor/src/main/java/mekanism/ParamNameMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,6 @@ public Set<String> getSupportedAnnotationTypes() {
162162

163163
@Override
164164
public SourceVersion getSupportedSourceVersion() {
165-
return SourceVersion.RELEASE_17;
165+
return SourceVersion.RELEASE_21;
166166
}
167167
}

build.gradle

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def setupTasks(SourceSet sourceSet) {
207207
outputs.upToDateWhen { false }
208208
def modsToml = copySpec {
209209
from(sourceSet.resources) {
210-
include "META-INF/mods.toml"
210+
include "META-INF/neoforge.mods.toml"
211211
expand versionProperties
212212
}
213213
}
@@ -234,7 +234,7 @@ def setupTasks(SourceSet sourceSet) {
234234
tasks.named(sourceSet.getProcessResourcesTaskName(), ProcessResources).configure { ProcessResources process ->
235235
setGroup("process resources")
236236
process.duplicatesStrategy(DuplicatesStrategy.FAIL)
237-
process.exclude('META-INF/mods.toml')
237+
process.exclude('META-INF/neoforge.mods.toml')
238238
process.from("${projectDir}") { include 'logo.png' }
239239
//Depend on the compile task so that we can map the computer methods as needed
240240
dependsOn(compileTask)
@@ -274,7 +274,8 @@ project.base.archivesName = "Mekanism"
274274
java {
275275
toolchain {
276276
languageVersion.set(JavaLanguageVersion.of("${java_version}"))
277-
vendor.set(JvmVendorSpec.JETBRAINS)
277+
//TODO - 1.20.5: Figure out why jetbrains jdk isn't found by foojay when requesting java 21 even though they have a release for JDK 21
278+
//vendor.set(JvmVendorSpec.JETBRAINS)
278279
}
279280
withSourcesJar()
280281
}
@@ -424,16 +425,17 @@ dependencies {
424425
//We use https://github.com/quicktheories/QuickTheories to allow for implementing property based testing
425426
testImplementation "org.quicktheories:quicktheories:${quicktheories_version}"
426427

427-
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
428-
compileOnly("mezz.jei:jei-${minecraft_version}-neoforge-api:${jei_version}")
428+
compileOnly("mezz.jei:jei-${previous_minor_minecraft_version}-common-api:${jei_version}")
429+
compileOnly("mezz.jei:jei-${previous_minor_minecraft_version}-neoforge-api:${jei_version}")
429430
if (recipe_viewer == "jei" || recipe_viewer == "hybrid") {
430-
runtimeOnly("mezz.jei:jei-${minecraft_version}-neoforge:${jei_version}")
431+
//TODO - 1.20.5: Re-enable when JEI updates
432+
//runtimeOnly("mezz.jei:jei-${previous_minor_minecraft_version}-neoforge:${jei_version}")
431433
}
432434

433-
compileOnly("dev.emi:emi-neoforge:${emi_version}+${minecraft_version}:api")
435+
compileOnly("dev.emi:emi-neoforge:${emi_version}+${previous_minor_minecraft_version}:api")
434436

435437
if (recipe_viewer == "emi" || recipe_viewer == "hybrid") {
436-
runtimeOnly("dev.emi:emi-neoforge:${emi_version}+${minecraft_version}")
438+
runtimeOnly("dev.emi:emi-neoforge:${emi_version}+${previous_minor_minecraft_version}")
437439
}
438440

439441
//TODO - 1.19: Re-enable once https://github.com/Chisel-Team/ConnectedTexturesMod/pull/204 is merged
@@ -448,14 +450,16 @@ dependencies {
448450
transitive = false
449451
}*/
450452
compileOnly("curse.maven:jade-api-324717:${jade_api_id}")
451-
runtimeOnly("curse.maven:jade-324717:${jade_id}")
453+
//TODO - 1.20.5: Re-enable when Jade updates
454+
//runtimeOnly("curse.maven:jade-324717:${jade_id}")
452455
compileOnly("mcp.mobius.waila:wthit-api:neo-${wthit_version}")
453456

454-
implementation("com.blamejared.crafttweaker:CraftTweaker-neoforge-${minecraft_version}:${crafttweaker_version}")
457+
//TODO - 1.20.5: Switch back to implementation when it updates
458+
compileOnly("com.blamejared.crafttweaker:CraftTweaker-neoforge-${previous_minor_minecraft_version}:${crafttweaker_version}")
455459
//TODO - 1.20.2: move back to implementation
456460
compileOnly("com.blamejared.jeitweaker:JeiTweaker-forge-${previous_minecraft_version}:${jeitweaker_version}")
457461

458-
compileOnly("dev.gigaherz.jsonthings:JsonThings-${minecraft_version}:${json_things_version}")
462+
compileOnly("dev.gigaherz.jsonthings:JsonThings-${previous_minor_minecraft_version}:${json_things_version}")
459463

460464
//Mods we have dependencies on but don't bother loading into the dev environment
461465
//compileOnly("curse.maven:projecte-api-226410:${projecte_api_id}")
@@ -464,15 +468,17 @@ dependencies {
464468
compileOnly("top.theillusivec4.curios:curios-neoforge:${curios_version}:api")
465469
compileOnly("com.blamejared.recipestages:RecipeStages:${recipe_stages_version}")
466470
compileOnly("curse.maven:opencomputers2-437654:${oc2_id}")
467-
compileOnly("cc.tweaked:cc-tweaked-${minecraft_version}-forge-api:${cc_tweaked_version}")
471+
compileOnly("cc.tweaked:cc-tweaked-${previous_minor_minecraft_version}-forge-api:${cc_tweaked_version}")
468472
//runtimeOnly("cc.tweaked:cc-tweaked-${minecraft_version}-forge:${cc_tweaked_version}")
469473
compileOnly("curse.maven:female-gender-forge-481655:${wildfire_gender_mod_id}")
470474

471475
//Dependencies for data generators for mod compat reference
472-
datagenMainImplementation("appeng:appliedenergistics2-neoforge:${ae2_version}")
473-
datagenMainRuntimeOnly("com.github.glitchfiend:GlitchCore-neoforge:${minecraft_version}-${glitchcore_version}")
474-
datagenMainRuntimeOnly("com.github.glitchfiend:TerraBlender-neoforge:${minecraft_version}-${terrablender_version}")
475-
datagenMainImplementation("com.github.glitchfiend:BiomesOPlenty-neoforge:${minecraft_version}-${biomesoplenty_version}")
476+
//TODO - 1.20.5: Switch back to datagenMainImplementation
477+
datagenMainCompileOnly("appeng:appliedenergistics2-neoforge:${ae2_version}")
478+
//TODO - 1.20.5: Switch back to datagenMainImplementation
479+
//datagenMainRuntimeOnly("com.github.glitchfiend:GlitchCore-neoforge:${previous_minor_minecraft_version}-${glitchcore_version}")
480+
//datagenMainRuntimeOnly("com.github.glitchfiend:TerraBlender-neoforge:${previous_minor_minecraft_version}-${terrablender_version}")
481+
datagenMainCompileOnly("com.github.glitchfiend:BiomesOPlenty-neoforge:${previous_minor_minecraft_version}-${biomesoplenty_version}")
476482
//TODO - 1.20.2: Switch back to datagenMainImplementation
477483
datagenMainCompileOnly("curse.maven:biomes-youll-go-247560:${byg_id}")
478484
//TODO - 1.20.2: Switch back to datagenMainImplementation

buildSrc/src/main/groovy/mekanism/MergeJars.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MergeJars {
2424

2525
static List<String> getGeneralPathsToExclude(Project project, List<SourceSet> sourceSets) {
2626
List<String> toExclude = new ArrayList<>()
27-
toExclude.add('META-INF/mods.toml')
27+
toExclude.add('META-INF/neoforge.mods.toml')
2828
toExclude.add('META-INF/accesstransformer.cfg')
2929
//This file doesn't exist until compile time
3030
toExclude.add('META-INF/services/mekanism.common.integration.computer.IComputerMethodRegistry')
@@ -57,7 +57,7 @@ class MergeJars {
5757
}
5858

5959
static void merge(Project project, List<SourceSet> sourceSets) {
60-
//Generate folders, merge the access transformers and mods.toml files
60+
//Generate folders, merge the access transformers and neoforge.mods.toml files
6161
project.mkdir("$project.buildDir/generated/META-INF")
6262
mergeBasic(project, sourceSets, 'META-INF/accesstransformer.cfg', (text, fileText) -> text + "\n" + fileText)
6363
mergeModsTOML(project, sourceSets)
@@ -77,7 +77,7 @@ class MergeJars {
7777
static List<Closure> getGeneratedClosures(Map<String, ?> versionProperties) {
7878
List<Closure> generated = new ArrayList<>()
7979
generated.add({ CopySpec c ->
80-
c.include('META-INF/mods.toml')
80+
c.include('META-INF/neoforge.mods.toml')
8181
c.expand(versionProperties)
8282
})
8383
generated.add({ CopySpec c ->
@@ -87,7 +87,7 @@ class MergeJars {
8787
}
8888

8989
private static void mergeModsTOML(Project project, List<SourceSet> sourceSets) {
90-
mergeBasic(project, sourceSets, 'META-INF/mods.toml', (text, fileText) -> {
90+
mergeBasic(project, sourceSets, 'META-INF/neoforge.mods.toml', (text, fileText) -> {
9191
//Add all but the first four lines (which are duplicated between the files)
9292
String[] lines = fileText.split("\n")
9393
for (int i = 4; i < lines.length; i++) {

docs/Development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Development
22

3-
Mekanism is developed for Minecraft 1.20.4 using NeoForge.
3+
Mekanism is developed for Minecraft 1.20.5 using NeoForge.
44

55
## Prerequisites
66

77
* Gradle - Version 8.7 is known to work, your mileage with other versions may vary
8-
* JDK - Version 17 is the target as that is what Mojang ships, but to run gradle you must use a minimum of JDK 11.
8+
* JDK - Version 21 is the target as that is what Mojang ships, but to run gradle you must use a minimum of JDK 11.
99

1010
## Directory Structure
1111

0 commit comments

Comments
 (0)