Skip to content

Commit

Permalink
删除历史遗留的花雨庭相关代码
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSkidder committed Jul 6, 2024
1 parent f76c640 commit 19bba47
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 184 deletions.
60 changes: 0 additions & 60 deletions shared/java/top/fpsmaster/features/impl/utility/Protocol.kt

This file was deleted.

10 changes: 0 additions & 10 deletions shared/java/top/fpsmaster/features/manager/ModuleManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ class ModuleManager {
module.toggle()
}
}

// 提醒一下lowiq怎么组队
if (ProviderManager.mcProvider.getPlayer() != null && ProviderManager.mcProvider.getServerAddress()?.contains("hytpc") == true) {
if (e.key == Keyboard.KEY_K) {
Utility.sendClientMessage("花雨庭组队提示:")
Utility.sendClientMessage("创建队伍并邀请玩家:/组队 玩家名")
Utility.sendClientMessage("接受组队邀请:/组队 邀请你的玩家名 【如果接受方是网易版请忽略该步骤】")
Utility.sendClientMessage("解散队伍:/组队 解散")
}
}
}

fun init() {
Expand Down
36 changes: 0 additions & 36 deletions shared/java/top/fpsmaster/modules/client/HytApi.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import net.minecraft.network.login.server.SPacketEncryptionRequest;
import net.minecraft.util.CryptManager;
import net.minecraft.util.text.TextComponentTranslation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.*;
import top.fpsmaster.event.EventDispatcher;
Expand All @@ -33,55 +32,8 @@ public abstract class MixinNetHandlerLoginClient {
@Final
@Shadow
private static Logger LOGGER;
@Unique
private boolean isHyt = false;


@Shadow
protected abstract MinecraftSessionService getSessionService();


/**
* @author SuperSkidder
* @reason for plugin
*/
@Overwrite
public void handleEncryptionRequest(SPacketEncryptionRequest packetIn) {
final SecretKey secretkey = CryptManager.createNewSharedKey();
String s = packetIn.getServerId();
PublicKey publickey = packetIn.getPublicKey();
String s1 = (new BigInteger(CryptManager.getServerIdHash(s, publickey, secretkey))).toString(16);
EventJoinServer eventJoinServer = new EventJoinServer(s1);
EventDispatcher.dispatchEvent(eventJoinServer);
isHyt = eventJoinServer.getCancel();
System.out.println("isHyt: " + isHyt);
if (mc.getCurrentServerData() != null && mc.getCurrentServerData().isOnLAN()) {
try {
this.getSessionService().joinServer(mc.getSession().getProfile(), mc.getSession().getToken(), s1);
} catch (AuthenticationException var10) {
LOGGER.warn("Couldn't connect to auth servers but will continue to join LAN");
}
} else {
if (!isHyt) {
try {
this.getSessionService().joinServer(mc.getSession().getProfile(), mc.getSession().getToken(), s1);
} catch (AuthenticationUnavailableException var7) {
this.networkManager.closeChannel(new TextComponentTranslation("disconnect.loginFailedInfo", new TextComponentTranslation("disconnect.loginFailedInfo.serversUnavailable")));
return;
} catch (InvalidCredentialsException var8) {
this.networkManager.closeChannel(new TextComponentTranslation("disconnect.loginFailedInfo", new TextComponentTranslation("disconnect.loginFailedInfo.invalidSession")));
return;
} catch (AuthenticationException var9) {
this.networkManager.closeChannel(new TextComponentTranslation("disconnect.loginFailedInfo", var9.getMessage()));
return;
}
}
}
isHyt = false;
this.networkManager.sendPacket(new CPacketEncryptionResponse(secretkey, publickey, packetIn.getVerifyToken()), new GenericFutureListener<Future<? super Void>>() {
public void operationComplete(Future<? super Void> p_operationComplete_1_) throws Exception {
networkManager.enableEncryption(secretkey);
}
});
}
}
30 changes: 0 additions & 30 deletions v1.12.2/src/main/java/top/fpsmaster/wrapper/HYTProvider.java

This file was deleted.

0 comments on commit 19bba47

Please sign in to comment.