Skip to content

Commit

Permalink
Remove useless Statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
opZywl committed Dec 7, 2023
1 parent e7f9ced commit e44e5c0
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 183 deletions.
3 changes: 0 additions & 3 deletions src/main/java/net/ccbluex/liquidbounce/FDPClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import net.ccbluex.liquidbounce.handler.combat.CombatManager
import net.ccbluex.liquidbounce.handler.discord.DiscordRPC
import net.ccbluex.liquidbounce.handler.network.BungeeCordSpoof
import net.ccbluex.liquidbounce.handler.network.ClientFixes
import net.ccbluex.liquidbounce.handler.other.ServerSpoof
import net.ccbluex.liquidbounce.ui.client.gui.EnumLaunchFilter
import net.ccbluex.liquidbounce.ui.client.gui.LaunchFilterInfo
import net.ccbluex.liquidbounce.ui.client.gui.LaunchOption
Expand Down Expand Up @@ -134,9 +133,7 @@ object FDPClient {
eventManager.registerListener(ClientFixes)
eventManager.registerListener(InventoryUtils)
eventManager.registerListener(BungeeCordSpoof())
eventManager.registerListener(ServerSpoof)
eventManager.registerListener(SessionUtils())
eventManager.registerListener(StatisticsUtils())
eventManager.registerListener(LocationCache())
eventManager.registerListener(macroManager)
eventManager.registerListener(combatManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import net.ccbluex.liquidbounce.file.FileManager
import net.ccbluex.liquidbounce.handler.network.AutoReconnect
import net.ccbluex.liquidbounce.handler.network.ClientFixes
import net.ccbluex.liquidbounce.handler.network.ProxyManager
import net.ccbluex.liquidbounce.handler.other.ServerSpoof
import net.ccbluex.liquidbounce.ui.client.GuiBackground
import net.ccbluex.liquidbounce.ui.client.altmanager.GuiAltManager
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ object DiscordRPC {
builder.setStartTimestamp(timestamp)
builder.setLargeImage(if (discordRPCModule.animated.get()){"https://skiddermc.github.io/repo/skiddermc/FDPclient/dcrpc/fdp.gif"} else {"https://skiddermc.github.io/repo/skiddermc/FDPclient/dcrpc/fdp.png"})
builder.setDetails(fdpwebsite + FDPClient.CLIENT_VERSION)
ServerUtils.getRemoteIp().also {
val str = (if(discordRPCModule.showServerValue.get()) "Server: $it\n" else "\n") + (if(discordRPCModule.showNameValue.get()) "IGN: ${if(mc.thePlayer != null) mc.thePlayer.name else mc.session.username}\n" else "\n") + (if(discordRPCModule.showHealthValue.get()) "HP: ${mc.thePlayer.health}\n" else "\n") + (if(discordRPCModule.showModuleValue.get()) "Enable: ${FDPClient.moduleManager.modules.count{ it.state }} of ${FDPClient.moduleManager.modules.size} Modules\n" else "\n") + (if(discordRPCModule.showOtherValue.get()) "Time: ${if(mc.isSingleplayer) "SinglePlayer\n" else SessionUtils.getFormatSessionTime()} Kills: ${StatisticsUtils.getKills()} Deaths: ${StatisticsUtils.getDeaths()}\n" else "\n")
ServerUtils.getRemoteIp().also { it ->
val str = (if(discordRPCModule.showServerValue.get()) "Server: $it\n" else "\n") + (if(discordRPCModule.showNameValue.get()) "IGN: ${if(mc.thePlayer != null) mc.thePlayer.name else mc.session.username}\n" else "\n") + (if(discordRPCModule.showHealthValue.get()) "HP: ${mc.thePlayer.health}\n" else "\n") + (if(discordRPCModule.showModuleValue.get()) "Enable: ${FDPClient.moduleManager.modules.count{ it.state }} of ${FDPClient.moduleManager.modules.size} Modules\n" else "\n") + (if(discordRPCModule.showOtherValue.get()) "Time: ${if(mc.isSingleplayer) "SinglePlayer\n" else SessionUtils.getFormatSessionTime()}\n" else "\n")
builder.setState(if(it.equals("Injecting", true)) "Injecting" else str)
}

// Check ipc client is connected and send rpc
if (ipcClient?.status == PipeStatus.CONNECTED)
ipcClient?.sendRichPresence(builder.build())
if (ipcClient.status == PipeStatus.CONNECTED)
ipcClient.sendRichPresence(builder.build())
}

fun stop() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.ccbluex.liquidbounce.injection.forge.mixins.gui;

import net.ccbluex.liquidbounce.ui.client.gui.GuiMainMenu;
import net.ccbluex.liquidbounce.utils.StatisticsUtils;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiGameOver;
import net.minecraft.client.gui.GuiYesNo;
Expand All @@ -18,7 +17,6 @@ public abstract class MixinGuiGameOver extends MixinGuiScreen implements GuiYesN
public void actionPerformed(GuiButton button, CallbackInfo callbackInfo) {
switch (button.id) {
case 0:
StatisticsUtils.addDeaths();
this.mc.thePlayer.respawnPlayer();
this.mc.displayGuiScreen(null);
break;
Expand All @@ -32,17 +30,4 @@ public void actionPerformed(GuiButton button, CallbackInfo callbackInfo) {
}
}
}

public void confirmClicked(boolean p_confirmClicked_1_, int p_confirmClicked_2_, CallbackInfo ci) {
if (p_confirmClicked_1_) {
StatisticsUtils.addDeaths();
this.mc.theWorld.sendQuittingDisconnectingPacket();
this.mc.loadWorld(null);
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
StatisticsUtils.addDeaths();
this.mc.thePlayer.respawnPlayer();
this.mc.displayGuiScreen(null);
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ class Text(
SessionUtils.getFormatSessionTime()
}
}
"kills" -> StatisticsUtils.getKills().toString()
"deaths" -> StatisticsUtils.getDeaths().toString()
"username" -> mc.getSession().username
"clientName" -> FDPClient.CLIENT_NAME
"clientVersion" -> FDPClient.CLIENT_VERSION
Expand Down
40 changes: 0 additions & 40 deletions src/main/java/net/ccbluex/liquidbounce/utils/StatisticsUtils.java

This file was deleted.

0 comments on commit e44e5c0

Please sign in to comment.