Skip to content

Commit 5aecdd6

Browse files
authored
Merge pull request #18 from MerchantCalico/chore/1.21.5
chore: Port to 1.21.5 + some additional fixes.
2 parents aba9971 + 0522b63 commit 5aecdd6

File tree

51 files changed

+1103
-661
lines changed

Some content is hidden

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

51 files changed

+1103
-661
lines changed

.github/workflows/test-fabric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
2525

2626
- name: Test Fabric
27-
run: ./gradlew fabric:runGameTestServer
27+
run: ./gradlew fabric:runGameTest

.github/workflows/test-neoforge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
2525

2626
- name: Test NeoForge
27-
run: ./gradlew neoforge:runGameTestServer
27+
run: ./gradlew neoforge:runGameTest

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ eclipse
2222
run
2323
runs
2424
.cache
25+
.kotlin
2526

2627
# OS
27-
.DS_Store
28+
.DS_Store

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
## Changed
2-
- tweak: add `GameCondition#getTemplate` for ease of access to condition templates
1+
## Breaking Changes
2+
- `silicate:entity_vehicle` must now use the `silicate:vehicle_entity` param type to reference the vehicle entity, with other fields remaining the exact same.
3+
- `silicate:entity_passenger` must now use the `silicate:passenger_entity` param type to reference the passenger entity, with other fields remaining the exact same.
4+
- `silicate:entity_tame_owner` must now use the `silicate:owner_entity` param type to reference the owner entity, with other fields remaining the exact same.
5+
- `silicate:entity_projectile_owner` must now use the `silicate:owner_entity` param type to reference the owner entity, with other fields remaining the exact same.
6+
- The ContextParamType codec will now return a data error if not present within the registry, or if the class of the registered param type is unable to be casted to the specified class. On a success, this will return the original context param type if it is an exact match in class, otherwise, this will create a new param type if the resulting class can be cast to the specified class.
7+
8+
## Added
9+
- Ported to 1.21.5.
310

411
## Fixed
5-
- fix(GameTest): add fake player to player list
12+
- Fixed `entity_vehicle`, `entity_passenger`, `entity_tame_owner`, `entity_projectile_owner` conditions overriding the original field with the target entity within their inner conditions' context.
13+
- Fixed issues with registering custom game conditions on NeoForge.
14+
- Fixed ContextParamType codec creating entirely new param types without checking if a param type of the sort exists already.
15+
- Fixed ContextParamType codec's entirely new param types not being equal to any param type in the case of casted classes.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.7-SNAPSHOT" apply false
3-
id("net.neoforged.moddev") version "2.0.76" apply false
2+
id("fabric-loom") version "1.10-SNAPSHOT" apply false
3+
id("net.neoforged.moddev") version "2.0.105" apply false
44
id("me.modmuss50.mod-publish-plugin") version net.modgarden.silicate.gradle.Versions.MOD_PUBLISH_PLUGIN apply false
55
}

buildSrc/src/main/kotlin/conventions.common.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,6 @@ dependencies {
4949
implementation("org.jetbrains:annotations:24.1.0")
5050
}
5151

52-
// Declare capabilities on the outgoing configurations.
53-
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component
54-
setOf("apiElements", "runtimeElements", "sourcesElements", "javadocElements").forEach { variant ->
55-
configurations.getByName(variant).outgoing {
56-
capability("$group:${Properties.MOD_ID}-${project.name}:$version")
57-
capability("$group:${Properties.MOD_ID}:$version")
58-
}
59-
publishing.publications.forEach { publication ->
60-
if (publication is MavenPublication) {
61-
publication.suppressPomMetadataWarningsFor(variant)
62-
}
63-
}
64-
}
65-
6652
tasks {
6753
named<Jar>("sourcesJar").configure {
6854
from(rootProject.file("LICENSE")) {

buildSrc/src/main/kotlin/conventions.loader.gradle.kts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import net.modgarden.silicate.gradle.Properties
2-
31
plugins {
42
id("conventions.common")
53
}
@@ -11,19 +9,33 @@ configurations {
119
register("commonResources") {
1210
isCanBeResolved = true
1311
}
12+
register("commonTestJava") {
13+
isCanBeResolved = true
14+
}
1415
register("commonTestResources") {
1516
isCanBeResolved = true
1617
}
1718
}
1819

19-
dependencies {
20-
compileOnly(project(":common")) {
21-
capabilities {
22-
requireCapability("$group:${Properties.MOD_ID}")
20+
gradle.projectsEvaluated {
21+
sourceSets {
22+
getByName("main") {
23+
compileClasspath += project(":common").sourceSets["main"].output
24+
runtimeClasspath += project(":common").sourceSets["main"].output
25+
}
26+
getByName("test") {
27+
compileClasspath += project(":common").sourceSets["test"].output
28+
runtimeClasspath += project(":common").sourceSets["test"].output
2329
}
2430
}
31+
}
32+
33+
dependencies {
34+
testCompileOnly(project(":common"))
35+
2536
"commonJava"(project(":common", "commonJava"))
2637
"commonResources"(project(":common", "commonResources"))
38+
"commonTestJava"(project(":common", "commonTestJava"))
2739
"commonTestResources"(project(":common", "commonTestResources"))
2840
}
2941

@@ -32,6 +44,10 @@ tasks {
3244
dependsOn(configurations.getByName("commonJava"))
3345
source(configurations.getByName("commonJava"))
3446
}
47+
named<JavaCompile>("compileTestJava").configure {
48+
dependsOn(configurations.getByName("commonTestJava"))
49+
source(configurations.getByName("commonTestJava"))
50+
}
3551
named<ProcessResources>("processResources").configure {
3652
dependsOn(configurations.getByName("commonResources"))
3753
from(configurations.getByName("commonResources"))

buildSrc/src/main/kotlin/net/modgarden/silicate/gradle/Versions.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
package net.modgarden.silicate.gradle
22

33
object Versions {
4-
const val MOD = "0.8.0"
4+
const val MOD = "0.9.0"
55

6-
const val MINECRAFT = "1.21.4"
7-
const val PARCHMENT_MINECRAFT = "1.21.4"
8-
const val NEOFORM = "$MINECRAFT-20241203.161809"
9-
const val PARCHMENT = "2025.01.19"
6+
const val MINECRAFT = "1.21.5"
7+
const val PARCHMENT_MINECRAFT = "1.21.5"
8+
const val NEOFORM = "$MINECRAFT-20250325.162830"
9+
const val PARCHMENT = "2025.04.19"
1010

11-
const val FABRIC_API = "0.116.0+1.21.4"
12-
const val FABRIC_LOADER = "0.16.10"
13-
const val MOD_MENU = "13.0.1"
11+
const val FABRIC_API = "0.128.1+1.21.5"
12+
const val FABRIC_LOADER = "0.16.14"
13+
const val MOD_MENU = "14.0.0-rc.2"
1414
const val FABRIC_LOADER_RANGE = ">=0.16"
15-
const val FABRIC_MINECRAFT_RANGE = ">=1.21.4"
15+
const val FABRIC_MINECRAFT_RANGE = "1.21.5"
1616

17-
const val NEOFORGE = "21.4.88-beta"
17+
const val NEOFORGE = "21.5.87"
1818
const val NEOFORGE_LOADER_RANGE = "[4,)"
19-
const val NEOFORGE_MINECRAFT_RANGE = "[1.21.4,)"
19+
const val NEOFORGE_MINECRAFT_RANGE = "[1.21.5,1.21.6)"
2020

2121
const val FABRIC_MIXIN = "0.15.5+mixin.0.8.7"
2222
const val MIXIN_EXTRAS = "0.4.1"

common/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ configurations {
4444
isCanBeResolved = false
4545
isCanBeConsumed = true
4646
}
47+
register("commonTestJava") {
48+
isCanBeResolved = false
49+
isCanBeConsumed = true
50+
}
4751
register("commonTestResources") {
4852
isCanBeResolved = false
4953
isCanBeConsumed = true
@@ -53,7 +57,7 @@ configurations {
5357
artifacts {
5458
add("commonJava", sourceSets["main"].java.sourceDirectories.singleFile)
5559
add("commonResources", sourceSets["main"].resources.sourceDirectories.singleFile)
56-
add("commonResources", sourceSets["generated"].resources.sourceDirectories.singleFile)
60+
add("commonTestJava", sourceSets["test"].java.sourceDirectories.singleFile)
5761
add("commonTestResources", sourceSets["test"].resources.sourceDirectories.singleFile)
5862
}
5963

common/src/main/java/net/modgarden/silicate/Silicate.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,21 @@
44
import net.minecraft.server.MinecraftServer;
55
import net.modgarden.silicate.api.SilicateBuiltInRegistries;
66
import net.modgarden.silicate.platform.SilicatePlatformHelper;
7-
import net.modgarden.silicate.test.SilicateGameTests;
87
import org.jetbrains.annotations.ApiStatus;
98
import org.slf4j.Logger;
109
import org.slf4j.LoggerFactory;
1110

12-
import java.util.List;
13-
1411
@ApiStatus.Internal
1512
public class Silicate {
1613
public static final String MOD_ID = "silicate";
1714
public static final String MOD_NAME = "Silicate";
1815
public static final Logger LOG = LoggerFactory.getLogger(MOD_NAME);
19-
public static final List<Class<?>> GAME_TESTS = List.of(
20-
SilicateGameTests.class
21-
);
2216
private static MinecraftServer server;
2317

2418
private static SilicatePlatformHelper helper;
2519

2620
public static void init() {
2721
LOG.info("Initializing Silicate");
28-
SilicateBuiltInRegistries.registerAll();
2922
}
3023

3124
public static void setServer(MinecraftServer server) {

0 commit comments

Comments
 (0)