diff options
author | Trumeet <yuuta@yuuta.moe> | 2022-07-26 19:06:11 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2022-07-26 19:06:11 -0700 |
commit | d8fe269327a1a51f2588a3573a4764613da16388 (patch) | |
tree | 97bd20983700bb13eba7f7d524d3c6d529303b46 /src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java | |
parent | 31a5d2990ba666ce5ef4a1f79f7999a9bdfaac2a (diff) | |
download | acron-d8fe269327a1a51f2588a3573a4764613da16388.tar acron-d8fe269327a1a51f2588a3573a4764613da16388.tar.gz acron-d8fe269327a1a51f2588a3573a4764613da16388.tar.bz2 acron-d8fe269327a1a51f2588a3573a4764613da16388.zip |
Move the mod to mod/
Diffstat (limited to 'src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java')
-rw-r--r-- | src/main/java/moe/ymc/acron/mixin/ServerLoginNetworkHandlerMixin.java | 47 |
1 files changed, 0 insertions, 47 deletions
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))); - } -} |