Skip to content

Commit

Permalink
feat: update to minecraft 1.21 (#346)
Browse files Browse the repository at this point in the history
* wip: update to 1.21
most stuff is still broken

* chore: continue porting to 1.21

* chore: even more porting work
(still not done)

* chore: porting continues
data component edition
(also simplify level -> celestialbody system)

* feat: it loads to the title screen

* chore: run datagen

* fix: hack around datagen registry restrictions

* feat: most things work now
* update tag conventions
* fix network recipe serialization
* synchronize dynamic registries

* feat: all tests pass, moon no longer crashes

* chore: update to 1.21.1 and optimize imports
* also add a missing license header

* chore: use an alternative maven
builds should work now
  • Loading branch information
marcus8448 committed Aug 24, 2024
1 parent e23e129 commit 0a7f714
Show file tree
Hide file tree
Showing 2,489 changed files with 26,914 additions and 27,991 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4

- name: Setup JDK 17
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Cache Gradle
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4

- name: Setup JDK 17
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Restore Gradle cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Crowdin Push
uses: crowdin/github-action@v1
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v4

- name: Crowdin Sync
uses: crowdin/github-action@v1
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4

- name: Setup JDK 17
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Cache Gradle
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The classic Minecraft space mod, rewritten from the ground up for modern version
Here we answer a few common questions we get regarding the release of the mod.\
More information can be found in the `#faq` channel in [our Discord](https://discord.gg/n3QqhMYyFK).

**When will Galacticraft 5 for 1.20+ be released?**\
**When will Galacticraft 5 for 1.21+ be released?**\
There is currently no ETA for a release.
Keep an eye out on [our Discord server](https://discord.gg/n3QqhMYyFK) for an alpha release announcement.

Expand Down
39 changes: 17 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ val objVersion = project.property("obj.version").toString()
plugins {
java
`maven-publish`
id("fabric-loom") version("1.6-SNAPSHOT")
id("fabric-loom") version("1.7-SNAPSHOT")
id("org.cadixdev.licenser") version("0.6.1")
id("org.ajoberstar.grgit") version("5.2.2")
id("dev.galacticraft.mojarn") version("0.1.2")
id("dev.galacticraft.mojarn") version("0.4.0+10")
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

withSourcesJar()
withJavadocJar()
Expand Down Expand Up @@ -134,7 +134,14 @@ loom {
}

afterEvaluate {
val mixinJarFile = configurations.compileClasspath.get().files { it.group == "net.fabricmc" && it.name == "sponge-mixin" }.first()
val mixinJarFile = configurations.runtimeClasspath.get().incoming.artifactView {
componentFilter {
it is ModuleComponentIdentifier
&& it.group == "net.fabricmc"
&& it.module == "sponge-mixin"
}
}.files.first()

configureEach {
vmArg("-javaagent:$mixinJarFile")

Expand All @@ -147,12 +154,8 @@ loom {

repositories {
mavenLocal()
maven("https://maven.galacticraft.net/repository/maven-releases/") {
content {
includeGroup("dev.galacticraft")
}
}
maven("https://maven.galacticraft.net/repository/maven-snapshots/") {
maven("https://repo.terradevelopment.net/repository/maven-releases/") {
// https://maven.galacticraft.net/repository/maven-releases
content {
includeGroup("dev.galacticraft")
}
Expand Down Expand Up @@ -240,8 +243,8 @@ dependencies {
}

multicompat(group = "mezz.jei",
api = "jei-$minecraftVersion-common-api",
extra = "jei-$minecraftVersion-fabric-api",
api = "jei-1.21-common-api",
extra = "jei-1.21-fabric-api",
// runtime = "jei-$minecraftVersion-fabric", // we already have REI at runtime
version = jeiVersion) {
exclude(group = "net.fabricmc.fabric-api")
Expand All @@ -266,21 +269,13 @@ tasks.processResources {
}
}

tasks.processTestResources {
inputs.property("version", project.version)

filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}

tasks.javadoc {
options.encoding = "UTF-8"
}

tasks.withType(JavaCompile::class) {
options.encoding = "UTF-8"
options.release.set(17)
options.release.set(21)
}

tasks.jar {
Expand Down
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
org.gradle.jvmargs=-Xmx2G

# Fabric Info
minecraft.version=1.20.4
loader.version=0.15.7
minecraft.version=1.21.1
loader.version=0.15.11
yarn.build=3

# Mod Info
Expand All @@ -12,14 +12,14 @@ mod.group=dev.galacticraft
mod.name=Galacticraft

# Dependencies
fabric.version=0.97.1+1.20.4
cloth.config.version=13.0.121
modmenu.version=9.0.0
rei.version=14.0.688
jei.version=17.3.0.49
dynamicdimensions.version=0.6.0+8
machinelib.version=0.4.2+48
badpackets.version=0.6.1
wthit.version=10.4.0
fabric.version=0.102.1+1.21.1
cloth.config.version=15.0.130
modmenu.version=11.0.1
rei.version=16.0.754
jei.version=19.8.2.99
dynamicdimensions.version=0.8.0+24
machinelib.version=0.7.0+74
badpackets.version=0.8.1
wthit.version=12.3.0
obj.version=0.4.0
architectury.version=11.1.17
architectury.version=13.0.6
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
9 changes: 8 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
pluginManagement {
repositories {
mavenLocal {
content {
includeGroup("dev.galacticraft")
includeGroup("dev.galacticraft.mojarn")
}
}
maven("https://maven.fabricmc.net/") {
name = "Fabric"
content {
Expand All @@ -8,7 +14,8 @@ pluginManagement {
includeGroup("fabric-loom")
}
}
maven("https://maven.galacticraft.net/repository/maven-releases/") {
maven("https://repo.terradevelopment.net/repository/maven-releases/") {
// https://maven.galacticraft.net/repository/maven-releases
content {
includeGroup("dev.galacticraft")
includeGroup("dev.galacticraft.mojarn")
Expand Down
3 changes: 2 additions & 1 deletion src/main/generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@


### Adding more resources
Resources that cannot be generated (e.g. music, textures, languages, etc.) should be put into [src/main/resources](../resources).
Resources that cannot be generated (e.g., music, textures, translations)
should be put into [src/main/resources](../resources).

To generate additional resources, see the `dev.galacticraft.mod.data` package.

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/generated/assets/galacticraft/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"banner_pattern.galacticraft.rocket": "Rocket",
"biome.galacticraft.basaltic_mare": "Basaltic Mare",
"biome.galacticraft.comet_tundra": "Comet Tundra",
"biome.galacticraft.lunar_highlands": "Lunar Highlands",
Expand Down Expand Up @@ -175,7 +176,6 @@
"block.galacticraft.moon_basalt_slab": "Moon Basalt Slab",
"block.galacticraft.moon_basalt_stairs": "Moon Basalt Stairs",
"block.galacticraft.moon_basalt_wall": "Moon Basalt Wall",
"block.galacticraft.moon_berry_bush": "Moon Berry Bush",
"block.galacticraft.moon_cheese_block": "Moon Cheese Wheel",
"block.galacticraft.moon_cheese_block.description": "Cheese Blocks are created from the cheeses of the Moon, place-able and edible.",
"block.galacticraft.moon_copper_ore": "Moon Copper Ore",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions src/main/generated/data/c/tags/block/clusters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"galacticraft:olivine_cluster"
]
}
19 changes: 19 additions & 0 deletions src/main/generated/data/c/tags/block/ores.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"values": [
"galacticraft:silicon_ore",
"galacticraft:deepslate_silicon_ore",
"galacticraft:moon_copper_ore",
"galacticraft:lunaslate_copper_ore",
"galacticraft:olivine_basalt",
"galacticraft:rich_olivine_basalt",
"galacticraft:tin_ore",
"galacticraft:deepslate_tin_ore",
"galacticraft:moon_tin_ore",
"galacticraft:lunaslate_tin_ore",
"galacticraft:aluminum_ore",
"galacticraft:deepslate_aluminum_ore",
"galacticraft:desh_ore",
"galacticraft:ilmenite_ore",
"galacticraft:galena_ore"
]
}
6 changes: 0 additions & 6 deletions src/main/generated/data/c/tags/blocks/clusters.json

This file was deleted.

Loading

0 comments on commit 0a7f714

Please sign in to comment.