Skip to content

Commit

Permalink
AddAll Command
Browse files Browse the repository at this point in the history
Remove ViaVersionFix module
Refactor ClientSpoof
Remove UUID Spoofer (useless)
Fixed Some Things
  • Loading branch information
zywl committed Dec 24, 2023
1 parent bb7bbe3 commit 8db4bb1
Show file tree
Hide file tree
Showing 55 changed files with 9,686 additions and 756 deletions.
6 changes: 2 additions & 4 deletions src/main/java/net/ccbluex/liquidbounce/FDPClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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.network.ClientSpoof
import net.ccbluex.liquidbounce.handler.network.ClientSpoofHandler
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 @@ -76,7 +76,6 @@ object FDPClient {
lateinit var combatManager: CombatManager
lateinit var macroManager: MacroManager
lateinit var configManager: ConfigManager
lateinit var clientSpoof: ClientSpoof

// Some UI things
lateinit var hud: HUD
Expand Down Expand Up @@ -126,7 +125,6 @@ object FDPClient {
keyBindManager = KeyBindManager()
combatManager = CombatManager()
tipSoundManager = TipSoundManager()
clientSpoof = ClientSpoof()

// Load language
LanguageManager.switchLanguage(Minecraft.getMinecraft().gameSettings.language)
Expand All @@ -140,7 +138,7 @@ object FDPClient {
eventManager.registerListener(LocationCache())
eventManager.registerListener(macroManager)
eventManager.registerListener(combatManager)
eventManager.registerListener(ClientSpoof())
eventManager.registerListener(ClientSpoofHandler())

// Load client fonts
Fonts.loadFonts()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FileManager : MinecraftInstance() {
val capesDir = File(dir, "capes")
val themesDir = File(dir, "themes")
val accountsConfig = AccountsConfig(File(dir, "accounts.json"))
var friendsConfig = FriendsConfig(File(dir, "friends.json"))
val friendsConfig = FriendsConfig(File(dir, "friends.json"))
val xrayConfig = XRayConfig(File(dir, "xray-blocks.json"))
val hudConfig = HudConfig(File(dir, "hud.json"))
val specialConfig = SpecialConfig(File(dir, "special.json"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ConfigManager {
val json = if (configFile.exists()) {
JsonParser().parse(configFile.reader(Charsets.UTF_8)).asJsonObject
} else {
JsonObject() // 这样方便一点,虽然效率会低
JsonObject()
}

for (section in sections) {
Expand Down Expand Up @@ -239,13 +239,6 @@ class ConfigManager {
}
}

// fun toLegacy(name: String){
// if(!LiquidBounce.fileManager.legacySettingsDir.exists())
// LiquidBounce.fileManager.legacySettingsDir.mkdir()
//
// val jsonObject=JsonParser().parse()
// }

/**
* Register [section]
*/
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/ccbluex/liquidbounce/event/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package net.ccbluex.liquidbounce.event

open class Event

open class CancellableEvent : Event() {

/**
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/net/ccbluex/liquidbounce/event/EventManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ class EventManager : MinecraftInstance() {

private val registry = HashMap<Class<out Event>, MutableList<EventHook>>()

// private val counter = HashMap<Class<out Event>, Int>()
// private var lastSyncTime = System.currentTimeMillis()

/**
* Register [listener]
*/
Expand Down Expand Up @@ -89,8 +86,8 @@ class EventManager : MinecraftInstance() {
throwable.printStackTrace()
}
}
}catch (e :Exception){
e.printStackTrace();
} catch (e :Exception) {
e.printStackTrace()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands;

import net.ccbluex.liquidbounce.FDPClient;
import net.ccbluex.liquidbounce.config.impl.FriendsConfig;
import net.ccbluex.liquidbounce.features.command.Command;
import net.ccbluex.liquidbounce.utils.render.ColorUtils;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.util.EnumChatFormatting;

import org.jetbrains.annotations.NotNull;

import java.util.concurrent.atomic.AtomicInteger;

public final class AddAllCommand extends Command {

public AddAllCommand() {super("addall", new String[]{""});}

@Override
public void execute(@NotNull String[] arguments) {
if (arguments.length == 2) {
final String tag = ColorUtils.translateAlternateColorCodes(arguments[1]);
final AtomicInteger count = new AtomicInteger(0);
final FriendsConfig config = FDPClient.fileManager.getFriendsConfig();
final boolean presistent = arguments[0].contains("");

mc.thePlayer.sendQueue.getPlayerInfoMap()
.forEach(player -> {
final ScorePlayerTeam team = player.getPlayerTeam();

assert team != null;

if (team != null) {
if (ColorUtils.stripColor(team.getColorPrefix()).contains(tag)
|| ColorUtils.stripColor(team.getColorSuffix()).contains(tag)) {
final String name = player.getGameProfile().getName();

config.addFriend(name, String.valueOf(presistent));

count.incrementAndGet();
}
}
});

alert("Were added " + EnumChatFormatting.WHITE + count.get() + EnumChatFormatting.GRAY + "§7 players.");

} else {
alert(EnumChatFormatting.GRAY + "Sintax: .addall <tag>");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.FDPClient
import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.features.module.EnumAutoDisableType
import net.ccbluex.liquidbounce.utils.misc.StringUtils

/**
* AutoDisable Command
*
* Allows you to manage the list of modules that are automatically disabled.
* It provides subcommands to add, remove, list and clear modules from the auto-disable list.
*/
class AutoDisableCommand : Command("autodisable", arrayOf("ad")) {
private val modes = EnumAutoDisableType.values().map { it.name.lowercase() }.toTypedArray()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType
import org.lwjgl.input.Keyboard

/**
* Bind Command
*
* Allows you to bind a key to a module, which means that the module will be activated when the key is pressed.
*/
class BindCommand : Command("bind", emptyArray()) {
/**
* Execute commands with provided [args]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.utils.ClientUtils
import org.lwjgl.input.Keyboard

/**
* Binds Command
*
* Allows you to manage the bindings of modules to keys.
* It provides subcommands to add, remove, list and clear bindings.
*/
class BindsCommand : Command("binds", emptyArray()) {
/**
* Execute commands with provided [args]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.FDPClient
Expand All @@ -6,6 +11,13 @@ import java.awt.Desktop
import java.io.File
import java.nio.file.Files

/**
* Config Command
*
* Provides various subcommands related to the configuration,
* such as loading configuration from an external source or an API
* and listing available configurations.
*/
class ConfigCommand : Command("config", arrayOf("cfg")) {
override fun execute(args: Array<String>) {
if (args.size > 1) {
Expand Down Expand Up @@ -80,7 +92,7 @@ class ConfigCommand : Command("config", arrayOf("cfg")) {
}

"save" -> {
FDPClient.configManager.save(true, true)
FDPClient.configManager.save(true, forceSave = true)
alert("Saved config ${FDPClient.configManager.nowConfig}")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import net.ccbluex.liquidbounce.features.module.modules.other.AntiBot
import net.ccbluex.liquidbounce.utils.misc.StringUtils
import net.ccbluex.liquidbounce.utils.render.ColorUtils

/**
* Friend Command
*
* Provides subcommands related to managing friends, such as adding, removing, aliasing, listing, and clearing friends.
*/
class FriendCommand : Command("friend", arrayOf("friends")) {
/**
* Execute commands with provided [args]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import net.ccbluex.liquidbounce.FDPClient
import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.utils.ClientUtils

/**
* Help Command
*
* Provides a help page for displaying other commands.
*/
class HelpCommand : Command("help", emptyArray()) {
/**
* Execute commands with provided [args]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.utils.ClientUtils

/**
* Hide Command
*
* Allows you to hide specific modules.
*/
class HideCommand : Command("hide", emptyArray()) {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.FDPClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.FDPClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.utils.PacketUtils
import net.ccbluex.liquidbounce.utils.misc.StringUtils
import net.minecraft.network.play.client.C01PacketChatMessage

class SayCommand : Command("say", emptyArray()) {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/

package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.FDPClient
import net.ccbluex.liquidbounce.features.command.Command
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification
import net.ccbluex.liquidbounce.ui.client.hud.Config
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType
import java.io.File
import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.command.commands

import net.ccbluex.liquidbounce.features.command.Command
Expand Down

This file was deleted.

Loading

0 comments on commit 8db4bb1

Please sign in to comment.