From d8fe269327a1a51f2588a3573a4764613da16388 Mon Sep 17 00:00:00 2001 From: Trumeet Date: Tue, 26 Jul 2022 19:06:11 -0700 Subject: Move the mod to mod/ --- .../mixin/ServerLoginNetworkHandlerMixin.java | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java (limited to 'src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java') diff --git a/src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java b/src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java deleted file mode 100644 index 94a48b5..0000000 --- a/src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java +++ /dev/null @@ -1,47 +0,0 @@ -package moe.ymc.acron.mixin; - -import com.mojang.authlib.GameProfile; -import moe.ymc.acron.s2c.Entity; -import moe.ymc.acron.s2c.EventQueue; -import moe.ymc.acron.s2c.event.EventDisconnected; -import moe.ymc.acron.s2c.event.EventPlayerJoined; -import net.minecraft.network.ClientConnection; -import net.minecraft.server.network.ServerLoginNetworkHandler; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.text.Text; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ServerLoginNetworkHandler.class) -public class ServerLoginNetworkHandlerMixin { - private static final Logger AC_LOGGER = LogManager.getLogger(); - - @Shadow - @Nullable - GameProfile profile; - - @Shadow - @Final - public ClientConnection connection; - - @Inject(at = @At("RETURN"), method = "onDisconnected") - private void onDisconnected(Text reason, CallbackInfo ci) { - EventQueue.enqueue(new EventDisconnected(profile == null ? null : - new Entity(profile), - reason.getString())); - } - - @Inject(at = @At("RETURN"), method = "addToServer") - private void addToServer(ServerPlayerEntity entity, CallbackInfo ci) { - AC_LOGGER.debug("addToServer: {}", - entity.getUuid()); - EventQueue.enqueue(new EventPlayerJoined(new Entity(entity))); - } -} -- cgit v1.2.3