Update Forge to enable Mixins

This commit is contained in:
shedaniel
2021-12-02 17:25:23 +08:00
parent 43dc2500e8
commit 582e0a001c
5 changed files with 14 additions and 9 deletions

View File

@@ -5,8 +5,8 @@ plugins {
loom {
forge {
// mixinConfig "architectury.mixins.json"
// mixinConfig "architectury-common.mixins.json"
mixinConfig "architectury.mixins.json"
mixinConfig "architectury-common.mixins.json"
}
}
@@ -33,8 +33,6 @@ dependencies {
common(project(path: ":common", configuration: "dev")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false }
// compile with mixins for now
compileClasspath("dev.architectury:mixin-patched:0.8.4.+")
}
processResources {

View File

@@ -44,7 +44,7 @@ public class MixinChunkSerializer {
private static ThreadLocal<WeakReference<ServerLevel>> level = new ThreadLocal<>();
@Inject(method = "read", at = @At("HEAD"))
private static void read(ServerLevel worldIn, StructureManager templateManagerIn, PoiManager poiManager, ChunkPos pos, CompoundTag compound, CallbackInfoReturnable<ProtoChunk> cir) {
private static void read(ServerLevel worldIn, PoiManager arg2, ChunkPos arg3, CompoundTag arg4, CallbackInfoReturnable<ProtoChunk> cir) {
level.set(new WeakReference<>(worldIn));
}

View File

@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[33,)"
loaderVersion = "[38,)"
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
license = "GNU LGPLv3"
@@ -17,6 +17,13 @@ license = "LGPL-3"
[[dependencies.architectury]]
modId = "minecraft"
mandatory = true
versionRange = "[1.17.1,)"
versionRange = "[1.18,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.architectury]]
modId = "forge"
mandatory = true
versionRange = "[38.0.6,)"
ordering = "NONE"
side = "BOTH"

View File

@@ -18,4 +18,4 @@ fabric_loader_version=0.12.5
fabric_api_version=0.43.1+1.18
mod_menu_version=3.0.0
forge_version=38.0.4
forge_version=38.0.8

View File

@@ -5,7 +5,7 @@ plugins {
loom {
forge {
// mixinConfig "architectury.mixins.json"
mixinConfig "architectury.mixins.json"
localMods {
forge {