From 9afb7c77fde8e5114be6782dab147b265547dda4 Mon Sep 17 00:00:00 2001 From: Chloe Dawn Date: Sat, 11 Jun 2022 15:15:40 +0100 Subject: [PATCH] Update wrapper and dependencies, port to 1.19 Supersedes #25 --- build.gradle.kts | 18 +++++++++--------- gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../couplings/impl/DoorBlockCoupling.java | 2 +- .../couplings/mixin/ServerPlayerMixin.java | 6 ++++-- src/main/resources/fabric.mod.json | 8 ++++---- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1d2f6f8..2c624fc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,13 @@ import java.time.Instant plugins { - id(/*net.fabricmc.*/ "fabric-loom") version "0.11.32" - id("net.nemerosa.versioning") version "2.15.1" + id(/*net.fabricmc.*/ "fabric-loom") version "0.12.48" + id("net.nemerosa.versioning") version "3.0.0" id("org.gradle.signing") } group = "dev.sapphic" -version = "1.8.1+1.18.2" +version = "1.9.0+1.19" if ("CI" in System.getenv()) { version = "$version-${versioning.info.build}" @@ -45,25 +45,25 @@ repositories { } dependencies { - minecraft("com.mojang:minecraft:1.18.2") + minecraft("com.mojang:minecraft:1.19") mappings(loom.layered { officialMojangMappings { nameSyntheticMembers = true } }) - modImplementation("net.fabricmc:fabric-loader:0.13.3") + modImplementation("net.fabricmc:fabric-loader:0.14.7") implementation("org.jetbrains:annotations:23.0.0") - implementation("org.checkerframework:checker-qual:3.21.2") + implementation("org.checkerframework:checker-qual:3.22.1") - modImplementation(include(fabricApi.module("fabric-api-base", "0.47.10+1.18.2"))!!) - modImplementation(include(fabricApi.module("fabric-networking-api-v1", "0.47.10+1.18.2"))!!) + modImplementation(include(fabricApi.module("fabric-api-base", "0.55.3+1.19"))!!) + modImplementation(include(fabricApi.module("fabric-networking-api-v1", "0.55.3+1.19"))!!) implementation(include("com.electronwill.night-config:core:3.6.5")!!) implementation(include("com.electronwill.night-config:toml:3.6.5")!!) - modRuntimeOnly("com.terraformersmc:modmenu:3.1.0") + modRuntimeOnly("com.terraformersmc:modmenu:4.0.0") } tasks { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db3bccc..e1e0c8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=a9a7b7baba105f6557c9dcf9c3c6e8f7e57e6b49889c5f1d133f015d0727e4be -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip +distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/dev/sapphic/couplings/impl/DoorBlockCoupling.java b/src/main/java/dev/sapphic/couplings/impl/DoorBlockCoupling.java index f64abe8..79f2982 100644 --- a/src/main/java/dev/sapphic/couplings/impl/DoorBlockCoupling.java +++ b/src/main/java/dev/sapphic/couplings/impl/DoorBlockCoupling.java @@ -77,7 +77,7 @@ public static void neighborChanged( if ((state.getBlock() == other.getBlock()) && areCoupled(state, other, powered)) { level.setBlock(offset, other.setValue(DoorBlock.OPEN, powered), 2); - level.gameEvent(powered ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, offset); + level.gameEvent(null, powered ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, offset); } } } diff --git a/src/main/java/dev/sapphic/couplings/mixin/ServerPlayerMixin.java b/src/main/java/dev/sapphic/couplings/mixin/ServerPlayerMixin.java index 879d9e1..2e73c8d 100644 --- a/src/main/java/dev/sapphic/couplings/mixin/ServerPlayerMixin.java +++ b/src/main/java/dev/sapphic/couplings/mixin/ServerPlayerMixin.java @@ -21,7 +21,9 @@ import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.player.ProfilePublicKey; import net.minecraft.world.level.Level; +import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; @@ -30,8 +32,8 @@ abstract class ServerPlayerMixin extends Player implements CouplingsPlayer { @Unique private boolean couplingIgnoresSneaking = true; ServerPlayerMixin( - final Level level, final BlockPos pos, final float spawnAngle, final GameProfile profile) { - super(level, pos, spawnAngle, profile); + final Level level, final BlockPos pos, final float spawnAngle, final GameProfile profile, final @Nullable ProfilePublicKey profilePublicKey) { + super(level, pos, spawnAngle, profile, profilePublicKey); } @Unique diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 376bdcf..54181d6 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -7,10 +7,10 @@ "license": "Apache-2.0", "icon": "pack.png", "depends": { - "fabricloader": ">=0.12.8", - "fabric-api-base": ">=0.4.3", - "fabric-networking-api-v1": ">=1.0.20", - "minecraft": "1.18.2", + "fabricloader": ">=0.14.6", + "fabric-api-base": ">=0.4.9", + "fabric-networking-api-v1": ">=1.0.27", + "minecraft": "1.19", "java": ">=17" }, "entrypoints": {