From 668d873089e34b63230abb54ded9ae0c917f6b6b Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 7 Sep 2023 15:01:04 +0800 Subject: [PATCH] Update to 1.20.2-pre1 Signed-off-by: shedaniel --- .../java/dev/architectury/mixin/fabric/MixinPlayerList.java | 3 ++- .../mixin/fabric/client/MixinClientPacketListener.java | 2 +- gradle.properties | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinPlayerList.java b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinPlayerList.java index 359b411f..8ded7f76 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinPlayerList.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinPlayerList.java @@ -22,6 +22,7 @@ import dev.architectury.event.events.common.PlayerEvent; import net.minecraft.network.Connection; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.server.network.CommonListenerCookie; import net.minecraft.server.players.PlayerList; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -32,7 +33,7 @@ @Mixin(PlayerList.class) public class MixinPlayerList { @Inject(method = "placeNewPlayer", at = @At("RETURN")) - private void placeNewPlayer(Connection connection, ServerPlayer serverPlayer, int latency, CallbackInfo ci) { + private void placeNewPlayer(Connection connection, ServerPlayer serverPlayer, CommonListenerCookie commonListenerCookie, CallbackInfo ci) { PlayerEvent.PLAYER_JOIN.invoker().join(serverPlayer); } diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientPacketListener.java b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientPacketListener.java index 5ab93450..361dfa45 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientPacketListener.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientPacketListener.java @@ -56,7 +56,7 @@ protected MixinClientPacketListener(Minecraft minecraft, Connection connection, super(minecraft, connection, commonListenerCookie); } - @Inject(method = "handleLogin", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Options;broadcastOptions()V")) + @Inject(method = "handleLogin", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Options;setServerRenderDistance(I)V", shift = At.Shift.AFTER)) private void handleLogin(ClientboundLoginPacket packet, CallbackInfo ci) { ClientPlayerEvent.CLIENT_PLAYER_JOIN.invoker().join(minecraft.player); } diff --git a/gradle.properties b/gradle.properties index 68e26959..18b771e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.daemon=false platforms=fabric -minecraft_version=23w35a -supported_version=23w35a +minecraft_version=1.20.2-pre1 +supported_version=1.20.2-pre1 artifact_type=beta @@ -14,7 +14,7 @@ base_version=10.0 maven_group=dev.architectury fabric_loader_version=0.14.22 -fabric_api_version=0.87.2+1.20.2 +fabric_api_version=0.88.2+1.20.2 mod_menu_version=7.0.0 forge_version=46.0.1