From e03275fdd01c5acff89ece4d6a5572958b02fba3 Mon Sep 17 00:00:00 2001 From: Pyrofab Date: Sun, 26 Mar 2023 16:12:24 +0200 Subject: [PATCH] Update to 1.19.4 --- build.gradle | 2 +- changelog.md | 5 +++ gradle.properties | 11 +++--- .../elmendorf/CheckedConnection.java | 2 +- .../ladysnake/elmendorf/GameTestUtil.java | 29 ---------------- .../elmendorf/PacketSequenceChecker.java | 2 +- .../elmendorf/impl/MockClientConnection.java | 2 +- .../ServerPlayNetworkHandlerAccessor.java | 34 +++++++++++++++++++ .../impl/mixin/TestContextMixin.java | 4 +-- src/main/resources/elmendorf.mixins.json | 1 + 10 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 src/main/java/io/github/ladysnake/elmendorf/impl/mixin/ServerPlayNetworkHandlerAccessor.java diff --git a/build.gradle b/build.gradle index bb5555e..dbaa438 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ chenille { withDependencyConfiguration() } - javaVersion = 17 + javaVersion = project.java_version.toInteger() license = 'MIT' } diff --git a/changelog.md b/changelog.md index 6d2faca..ae7995a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +------------------------------------------------------ +Version 0.10.0 +------------------------------------------------------ +Updated to 1.19.4 + ------------------------------------------------------ Version 0.9.1 ------------------------------------------------------ diff --git a/gradle.properties b/gradle.properties index 52873d6..cd577ad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,12 +3,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/versions.html - minecraft_version=1.19.3 - yarn_mappings=1.19.3+build.5 - loader_version=0.14.14 + minecraft_version=1.19.4 + yarn_mappings=1.19.4+build.1 + loader_version=0.14.17 + java_version=17 # Mod Properties - mod_version = 0.9.1 + mod_version = 0.10.0 maven_group = io.github.ladysnake archives_base_name = elmendorf @@ -17,5 +18,5 @@ org.gradle.jvmargs=-Xmx1G owners = Ladysnake # Dependencies - fabric_version=0.73.2+1.19.3 + fabric_version=0.76.0+1.19.4 cca_version=5.0.1 diff --git a/src/main/java/io/github/ladysnake/elmendorf/CheckedConnection.java b/src/main/java/io/github/ladysnake/elmendorf/CheckedConnection.java index 436bdc6..ad8eea2 100644 --- a/src/main/java/io/github/ladysnake/elmendorf/CheckedConnection.java +++ b/src/main/java/io/github/ladysnake/elmendorf/CheckedConnection.java @@ -24,7 +24,7 @@ import dev.onyxstudios.cca.api.v3.component.ComponentKey; import net.minecraft.entity.Entity; -import net.minecraft.network.Packet; +import net.minecraft.network.packet.Packet; import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/io/github/ladysnake/elmendorf/GameTestUtil.java b/src/main/java/io/github/ladysnake/elmendorf/GameTestUtil.java index 57e4b50..cdc0112 100644 --- a/src/main/java/io/github/ladysnake/elmendorf/GameTestUtil.java +++ b/src/main/java/io/github/ladysnake/elmendorf/GameTestUtil.java @@ -22,16 +22,11 @@ */ package io.github.ladysnake.elmendorf; -import io.github.ladysnake.elmendorf.impl.MockClientConnection; -import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.test.GameTestException; -import net.minecraft.test.TestContext; import org.jetbrains.annotations.Nullable; import org.junit.Assert; import org.junit.function.ThrowingRunnable; -import java.util.function.Consumer; - public final class GameTestUtil { public static void assertTrue(String errorMessage, boolean b) { if (!b) throw new GameTestException(errorMessage); @@ -52,28 +47,4 @@ public static void assertThrows(@Nullable String errorMessage, Class configurator) { - configurator.accept(((MockClientConnection) player.networkHandler.connection)); + configurator.accept(((MockClientConnection) ((ServerPlayNetworkHandlerAccessor) player.networkHandler).elmendorf$getConnection())); } @Override public void verifyConnection(ServerPlayerEntity player, Consumer verifier) { - verifier.accept(((MockClientConnection) player.networkHandler.connection)); + verifier.accept(((MockClientConnection) ((ServerPlayNetworkHandlerAccessor) player.networkHandler).elmendorf$getConnection())); } } diff --git a/src/main/resources/elmendorf.mixins.json b/src/main/resources/elmendorf.mixins.json index 6b7a3e4..4c26c08 100644 --- a/src/main/resources/elmendorf.mixins.json +++ b/src/main/resources/elmendorf.mixins.json @@ -5,6 +5,7 @@ "compatibilityLevel": "JAVA_17", "mixins": [ "ClientConnectionAccessor", + "ServerPlayNetworkHandlerAccessor", "TestContextMixin", "XmlReportingTestCompletionListenerMixin", "flakyfix.GameTestStateMixin",