mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
@@ -22,6 +22,7 @@ package dev.architectury.mixin.fabric;
|
||||
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 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public abstract class MixinClientPacketListener extends ClientCommonPacketListen
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user