├── .github └── CODING_STANDARDS.md ├── .gitignore ├── .idea └── runConfigurations │ └── LiquidCat.xml ├── LICENSE ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── libs └── nashorn.jar ├── settings.gradle └── src └── main ├── java ├── co │ └── uk │ │ └── hexeption │ │ └── utils │ │ └── OutlineUtils.java └── net │ └── ccbluex │ └── liquidbounce │ ├── injection │ ├── forge │ │ ├── MixinLoader.java │ │ ├── TransformerLoader.java │ │ └── mixins │ │ │ ├── block │ │ │ ├── MixinBlock.java │ │ │ ├── MixinBlockAnvil.java │ │ │ ├── MixinBlockLiquid.java │ │ │ ├── MixinBlockModelRenderer.java │ │ │ ├── MixinBlockSoulSand.java │ │ │ └── MixinBlockWeb.java │ │ │ ├── client │ │ │ ├── MixinMinecraft.java │ │ │ ├── MixinProfiler.java │ │ │ └── MixinResourcePackRepository.java │ │ │ ├── entity │ │ │ ├── MixinAbstractClientPlayer.java │ │ │ ├── MixinEntity.java │ │ │ ├── MixinEntityLivingBase.java │ │ │ ├── MixinEntityPlayer.java │ │ │ ├── MixinEntityPlayerSP.java │ │ │ └── MixinPlayerControllerMP.java │ │ │ ├── gui │ │ │ ├── MixinGuiChat.java │ │ │ ├── MixinGuiConnecting.java │ │ │ ├── MixinGuiDisconnected.java │ │ │ ├── MixinGuiEditSign.java │ │ │ ├── MixinGuiInGame.java │ │ │ ├── MixinGuiIngameMenu.java │ │ │ ├── MixinGuiKeyBindingList.java │ │ │ ├── MixinGuiMultiplayer.java │ │ │ ├── MixinGuiNewChat.java │ │ │ ├── MixinGuiScreen.java │ │ │ ├── MixinGuiSlot.java │ │ │ ├── MixinGuiSpectator.java │ │ │ └── MixinServerSelectionList.java │ │ │ ├── item │ │ │ ├── MixinItemRenderer.java │ │ │ └── MixinItemStack.java │ │ │ ├── network │ │ │ ├── MixinNetHandlerLoginClient.java │ │ │ ├── MixinNetHandlerPlayClient.java │ │ │ ├── MixinNetworkManager.java │ │ │ └── MixinNetworkPlayerInfo.java │ │ │ ├── packets │ │ │ └── MixinC00Handshake.java │ │ │ ├── render │ │ │ ├── MixinEffectRenderer.java │ │ │ ├── MixinEntityRenderer.java │ │ │ ├── MixinFontRenderer.java │ │ │ ├── MixinLayerHeldItem.java │ │ │ ├── MixinModelBiped.java │ │ │ ├── MixinRender.java │ │ │ ├── MixinRenderEntityItem.java │ │ │ ├── MixinRendererLivingEntity.java │ │ │ ├── MixinTileEntityChestRenderer.java │ │ │ ├── MixinTileEntityItemStackRenderer.java │ │ │ ├── MixinTileEntityMobSpawnerRenderer.java │ │ │ ├── MixinTileEntityRendererDispatcher.java │ │ │ └── MixinVisGraph.java │ │ │ ├── resources │ │ │ └── MixinSkinManager.java │ │ │ └── world │ │ │ ├── MixinWorld.java │ │ │ └── MixinWorldClient.java │ ├── implementations │ │ ├── IItemStack.java │ │ └── IMixinGuiSlot.java │ └── transformers │ │ └── ForgeNetworkTransformer.java │ ├── script │ ├── Script.kt │ ├── ScriptManager.kt │ ├── api │ │ ├── ScriptCommand.kt │ │ ├── ScriptModule.kt │ │ ├── ScriptTab.kt │ │ └── global │ │ │ ├── Chat.kt │ │ │ └── Setting.kt │ └── remapper │ │ ├── Remapper.kt │ │ └── injection │ │ ├── transformers │ │ ├── AbstractJavaLinkerTransformer.java │ │ └── handlers │ │ │ └── AbstractJavaLinkerHandler.kt │ │ └── utils │ │ ├── ClassUtils.kt │ │ └── NodeUtils.kt │ ├── ui │ ├── client │ │ ├── GuiModsMenu.kt │ │ ├── GuiScripts.kt │ │ ├── altmanager │ │ │ ├── GuiAltManager.java │ │ │ └── sub │ │ │ │ ├── GuiAdd.java │ │ │ │ ├── GuiChangeName.java │ │ │ │ ├── GuiDirectLogin.java │ │ │ │ ├── GuiSessionLogin.kt │ │ │ │ └── altgenerator │ │ │ │ └── GuiTheAltening.kt │ │ └── clickgui │ │ │ ├── ClickGui.java │ │ │ ├── Panel.java │ │ │ ├── elements │ │ │ ├── ButtonElement.java │ │ │ ├── Element.java │ │ │ └── ModuleElement.java │ │ │ └── style │ │ │ ├── Style.java │ │ │ └── styles │ │ │ ├── LiquidBounceStyle.java │ │ │ ├── NullStyle.java │ │ │ └── SlowlyStyle.java │ └── font │ │ ├── AWTFontRenderer.kt │ │ ├── CachedFont.kt │ │ ├── FontDetails.java │ │ ├── Fonts.java │ │ └── GameFontRenderer.kt │ └── utils │ ├── MinecraftInstance.java │ ├── RaycastUtils.java │ ├── RotationUtils.java │ ├── TabUtils.java │ └── misc │ └── FallingPlayer.java ├── kotlin └── lol │ └── liquidcat │ ├── LiquidCat.kt │ ├── chat │ ├── Client.kt │ ├── ClientHandler.kt │ ├── ClientListener.kt │ ├── User.kt │ └── packet │ │ ├── PacketDeserializer.kt │ │ ├── PacketSerializer.kt │ │ ├── SerializedPacket.kt │ │ └── packets │ │ ├── ClientPackets.kt │ │ ├── Packet.kt │ │ └── ServerPackets.kt │ ├── discord │ └── RichPresence.kt │ ├── event │ ├── Event.kt │ ├── EventManager.kt │ ├── Events.kt │ └── Listenable.kt │ ├── features │ ├── command │ │ ├── Command.kt │ │ ├── CommandManager.kt │ │ ├── commands │ │ │ ├── BindCommand.kt │ │ │ ├── BindsCommand.kt │ │ │ ├── EnchantCommand.kt │ │ │ ├── FriendCommand.kt │ │ │ ├── HClipCommand.kt │ │ │ ├── HelpCommand.kt │ │ │ ├── HideCommand.kt │ │ │ ├── HoloStandCommand.kt │ │ │ ├── HurtCommand.kt │ │ │ ├── LocalAutoSettingsCommand.kt │ │ │ ├── LoginCommand.kt │ │ │ ├── PanicCommand.kt │ │ │ ├── PingCommand.kt │ │ │ ├── PrefixCommand.kt │ │ │ ├── ReloadCommand.kt │ │ │ ├── RemoteViewCommand.kt │ │ │ ├── RenameCommand.kt │ │ │ ├── SayCommand.kt │ │ │ ├── ScriptManagerCommand.kt │ │ │ ├── ServerInfoCommand.kt │ │ │ ├── ShortcutCommand.kt │ │ │ ├── TargetCommand.kt │ │ │ ├── ToggleCommand.kt │ │ │ ├── UsernameCommand.kt │ │ │ └── VClipCommand.kt │ │ └── shortcuts │ │ │ ├── Shortcut.kt │ │ │ ├── ShortcutParser.kt │ │ │ └── Tokens.kt │ ├── friend │ │ └── FriendManager.kt │ ├── misc │ │ ├── AntiForge.kt │ │ ├── AutoReconnect.kt │ │ └── BungeeCordSpoof.kt │ └── module │ │ ├── Module.kt │ │ ├── ModuleCategory.kt │ │ ├── ModuleCommand.kt │ │ ├── ModuleManager.kt │ │ └── modules │ │ ├── combat │ │ ├── Aimbot.kt │ │ ├── AutoArmor.kt │ │ ├── AutoBow.kt │ │ ├── AutoClicker.kt │ │ ├── AutoLeave.kt │ │ ├── AutoPot.kt │ │ ├── AutoSoup.kt │ │ ├── AutoWeapon.kt │ │ ├── BowAimbot.kt │ │ ├── ComboDamage.kt │ │ ├── Criticals.kt │ │ ├── FastBow.kt │ │ ├── HitBox.kt │ │ ├── KillAura.kt │ │ ├── NoFriends.kt │ │ ├── SuperKnockback.kt │ │ └── Velocity.kt │ │ ├── exploit │ │ ├── AbortBreaking.kt │ │ ├── AntiHunger.kt │ │ ├── Clip.kt │ │ ├── Disabler.kt │ │ ├── ForceUnicodeChat.kt │ │ ├── GhostHand.kt │ │ ├── KeepContainer.kt │ │ ├── Kick.kt │ │ ├── MoreCarry.kt │ │ ├── MultiActions.kt │ │ ├── NoPitchLimit.kt │ │ ├── PingSpoof.kt │ │ ├── Plugins.kt │ │ ├── PortalMenu.kt │ │ └── VehicleOneHit.kt │ │ ├── fun │ │ ├── Derp.kt │ │ └── SkinDerp.kt │ │ ├── misc │ │ ├── AntiBot.kt │ │ ├── AtAllProvider.kt │ │ ├── LiquidChat.kt │ │ ├── MidClick.kt │ │ ├── NameProtect.kt │ │ ├── NoClose.kt │ │ ├── NoRotate.kt │ │ ├── ResourcePackSpoof.kt │ │ ├── Spammer.kt │ │ └── Teams.kt │ │ ├── movement │ │ ├── AirJump.kt │ │ ├── AutoWalk.kt │ │ ├── BugUp.kt │ │ ├── FastClimb.kt │ │ ├── Fly.kt │ │ ├── GuiMove.kt │ │ ├── HighJump.kt │ │ ├── LiquidWalk.kt │ │ ├── LongJump.kt │ │ ├── NoJumpDelay.kt │ │ ├── NoSlow.kt │ │ ├── Parkour.kt │ │ ├── ReverseStep.kt │ │ ├── SafeWalk.kt │ │ ├── SlimeJump.kt │ │ ├── Speed.kt │ │ ├── Spider.kt │ │ ├── Sprint.kt │ │ ├── Step.kt │ │ └── Strafe.kt │ │ ├── player │ │ ├── AntiCactus.kt │ │ ├── AutoRespawn.kt │ │ ├── AutoTool.kt │ │ ├── Blink.kt │ │ ├── Eagle.kt │ │ ├── FastUse.kt │ │ ├── InventoryCleaner.kt │ │ ├── NoFall.kt │ │ ├── Reach.kt │ │ ├── Regen.kt │ │ └── Zoot.kt │ │ ├── render │ │ ├── Ambience.kt │ │ ├── AntiBlind.kt │ │ ├── BlockESP.kt │ │ ├── BlockOverlay.kt │ │ ├── Breadcrumbs.kt │ │ ├── CameraClip.kt │ │ ├── Chams.kt │ │ ├── ClickGUI.kt │ │ ├── ESP.kt │ │ ├── ESP2D.kt │ │ ├── FOV.kt │ │ ├── FreeCam.kt │ │ ├── Fullbright.kt │ │ ├── FunnyHat.kt │ │ ├── FunnyJump.kt │ │ ├── HUD.kt │ │ ├── HeadRotations.kt │ │ ├── ItemView.kt │ │ ├── NameTags.kt │ │ ├── NoBob.kt │ │ ├── NoHurtCam.kt │ │ ├── NoScoreboard.kt │ │ ├── NoSwing.kt │ │ ├── Projectiles.kt │ │ ├── ShaderESP.kt │ │ ├── StorageESP.kt │ │ ├── SwingAnimation.kt │ │ ├── Tracers.kt │ │ ├── TrueSight.kt │ │ └── XRay.kt │ │ └── world │ │ ├── AutoBreak.kt │ │ ├── ChestAura.kt │ │ ├── ChestStealer.kt │ │ ├── CivBreak.kt │ │ ├── FastBreak.kt │ │ ├── FastPlace.kt │ │ ├── Fucker.kt │ │ ├── Liquids.kt │ │ ├── NoSlowBreak.kt │ │ ├── Nuker.kt │ │ ├── Scaffold.kt │ │ └── Timer.kt │ ├── file │ ├── FileConfig.kt │ ├── FileManager.kt │ └── configs │ │ ├── AccountsConfig.kt │ │ ├── ClickGuiConfig.kt │ │ ├── FriendsConfig.kt │ │ ├── HudConfig.kt │ │ ├── ModulesConfig.kt │ │ ├── ShortcutsConfig.kt │ │ ├── ValuesConfig.kt │ │ └── XRayConfig.kt │ ├── ui │ └── client │ │ ├── CGuiButton.kt │ │ ├── GuiPasswordField.kt │ │ ├── guis │ │ ├── GuiAntiForge.kt │ │ └── GuiMainMenu.kt │ │ └── hud │ │ ├── Config.kt │ │ ├── HUD.kt │ │ ├── designer │ │ ├── EditorPanel.kt │ │ └── GuiHudDesigner.kt │ │ └── element │ │ ├── Align.kt │ │ ├── Element.kt │ │ └── elements │ │ ├── Armor.kt │ │ ├── Arraylist.kt │ │ ├── Bossbar.kt │ │ ├── Effects.kt │ │ ├── Image.kt │ │ ├── Inventory.kt │ │ ├── Keystrokes.kt │ │ ├── Model.kt │ │ ├── Notifications.kt │ │ ├── Radar.kt │ │ ├── ScoreboardElement.kt │ │ ├── SpeedGraph.kt │ │ ├── TabGUI.kt │ │ └── Text.kt │ ├── utils │ ├── ClassUtils.kt │ ├── ClientUtils.kt │ ├── MathExtensions.kt │ ├── MiscUtils.kt │ ├── RollingArrayLongBuffer.kt │ ├── Rotation.kt │ ├── ServerUtils.kt │ ├── SettingsUtils.kt │ ├── StringUtils.kt │ ├── block │ │ ├── BlockExtensions.kt │ │ └── PlaceInfo.kt │ ├── click │ │ ├── CPSCounter.kt │ │ └── ClickHandler.kt │ ├── entity │ │ ├── EntityExtensions.kt │ │ └── EntityUtils.kt │ ├── io │ │ └── HttpUtils.kt │ ├── item │ │ ├── ArmorComparator.kt │ │ ├── ArmorPiece.kt │ │ └── ItemExtensions.kt │ ├── login │ │ ├── LoginUtils.kt │ │ ├── MinecraftAccount.kt │ │ └── UserUtils.kt │ ├── render │ │ ├── GLUtils.kt │ │ ├── StencilUtils.kt │ │ ├── WorldToScreen.kt │ │ ├── animation │ │ │ ├── Animation.kt │ │ │ └── easing │ │ │ │ ├── Easing.kt │ │ │ │ └── easings │ │ │ │ ├── Back.kt │ │ │ │ ├── Bounce.kt │ │ │ │ ├── Circ.kt │ │ │ │ ├── Cubic.kt │ │ │ │ ├── Elastic.kt │ │ │ │ ├── Expo.kt │ │ │ │ ├── Quad.kt │ │ │ │ ├── Quart.kt │ │ │ │ ├── Quint.kt │ │ │ │ └── Sine.kt │ │ ├── color │ │ │ ├── ColorExtensions.kt │ │ │ └── ColorUtils.kt │ │ └── shader │ │ │ ├── FramebufferShader.kt │ │ │ ├── Shader.kt │ │ │ └── shaders │ │ │ ├── BlurShader.kt │ │ │ ├── CircleShader.kt │ │ │ ├── GlowShader.kt │ │ │ ├── OutlineShader.kt │ │ │ ├── RoundRectShader.kt │ │ │ └── SRoundRectShader.kt │ └── timer │ │ ├── MSTimer.kt │ │ └── TimeUtils.kt │ └── value │ └── Value.kt └── resources ├── assets └── minecraft │ └── liquidcat │ ├── fonts │ ├── Nunito-Bold.ttf │ ├── Nunito-ExtraBold.ttf │ └── Nunito-Regular.ttf │ ├── images │ ├── favicon │ │ ├── icon_16px.png │ │ └── icon_32px.png │ ├── hud │ │ ├── check_icon.png │ │ ├── close_icon.png │ │ └── custom_hud_icon.png │ └── menu │ │ ├── background.png │ │ └── logo.png │ ├── scriptapi │ └── legacy.js │ └── shader │ ├── fragment │ ├── blur.frag │ ├── circle.frag │ ├── glow.frag │ ├── outline.frag │ ├── roundrect.frag │ └── separateroundrect.frag │ └── vertex.vert ├── liquidcat.forge.mixins.json ├── liquidcat_at.cfg └── mcmod.info /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea/* 15 | !.idea/runConfigurations/ 16 | 17 | # gradle 18 | build 19 | .gradle 20 | 21 | # other 22 | eclipse 23 | run -------------------------------------------------------------------------------- /.idea/runConfigurations/LiquidCat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project 2 | project_name = LiquidCat 3 | project_version = 1.0 4 | maven_group = lol.liquidcat 5 | archives_base_name = liquidcat 6 | 7 | # Kotlin 8 | kotlin.code.style = official 9 | kotlin_version = 1.6.21 10 | detekt_version = 1.19.0 11 | 12 | # Minecraft 13 | forgegradle_version = ddb1eb0 14 | mixingradle_version = ae2a80e 15 | 16 | # Other 17 | org.gradle.jvmargs = -Xmx4g -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CatsDevelopment/LiquidCat/f4d0eeca84ce48f8dd29c61a86e4cd8afe4a6a4c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip -------------------------------------------------------------------------------- /libs/nashorn.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CatsDevelopment/LiquidCat/f4d0eeca84ce48f8dd29c61a86e4cd8afe4a6a4c/libs/nashorn.jar -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenCentral() 4 | gradlePluginPortal() 5 | 6 | maven { url = "https://maven.minecraftforge.net/" } 7 | maven { url = "https://jitpack.io/" } 8 | maven { url = "https://repo.spongepowered.org/repository/maven-public/" } 9 | } 10 | resolutionStrategy { 11 | eachPlugin { 12 | switch (requested.id.id) { 13 | case "net.minecraftforge.gradle.forge": 14 | useModule("com.github.asbyth:ForgeGradle:${forgegradle_version}") 15 | break 16 | 17 | case "org.spongepowered.mixin": 18 | useModule("com.github.xcfrg:mixingradle:${mixingradle_version}") 19 | break 20 | } 21 | } 22 | } 23 | plugins { 24 | id "org.jetbrains.kotlin.jvm" version kotlin_version 25 | id "io.gitlab.arturbosch.detekt" version detekt_version 26 | } 27 | } 28 | 29 | rootProject.name = project_name -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/MixinLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge; 7 | 8 | import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; 9 | 10 | import org.spongepowered.asm.launch.MixinBootstrap; 11 | import org.spongepowered.asm.mixin.MixinEnvironment; 12 | import org.spongepowered.asm.mixin.Mixins; 13 | 14 | import java.util.Map; 15 | 16 | public class MixinLoader implements IFMLLoadingPlugin { 17 | 18 | public MixinLoader() { 19 | System.out.println("[LiquidBounce] Injecting with IFMLLoadingPlugin."); 20 | 21 | MixinBootstrap.init(); 22 | Mixins.addConfiguration("liquidcat.forge.mixins.json"); 23 | MixinEnvironment.getDefaultEnvironment().setSide(MixinEnvironment.Side.CLIENT); 24 | } 25 | 26 | @Override 27 | public String[] getASMTransformerClass() { 28 | return new String[0]; 29 | } 30 | 31 | @Override 32 | public String getModContainerClass() { 33 | return null; 34 | } 35 | 36 | @Override 37 | public String getSetupClass() { 38 | return null; 39 | } 40 | 41 | @Override 42 | public void injectData(Map data) { 43 | } 44 | 45 | @Override 46 | public String getAccessTransformerClass() { 47 | return null; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlockAnvil.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.block; 2 | 3 | import net.minecraft.block.BlockAnvil; 4 | import net.minecraft.block.state.IBlockState; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.util.BlockPos; 7 | import net.minecraft.util.EnumFacing; 8 | import net.minecraft.world.World; 9 | 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | @Mixin(BlockAnvil.class) 16 | public abstract class MixinBlockAnvil extends MixinBlock { 17 | 18 | @Inject(method = "onBlockPlaced", cancellable = true, at = @At("HEAD")) 19 | private void injectAnvilCrashFix(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, CallbackInfoReturnable cir) { 20 | if (((meta >> 2) & ~0x3) != 0) { 21 | cir.setReturnValue(super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(BlockAnvil.FACING, placer.getHorizontalFacing().rotateY()).withProperty(BlockAnvil.DAMAGE, 2)); 22 | cir.cancel(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlockLiquid.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.block; 7 | 8 | import net.minecraft.block.BlockLiquid; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 16 | 17 | import lol.liquidcat.features.module.modules.world.Liquids; 18 | 19 | @SideOnly(Side.CLIENT) 20 | @Mixin(BlockLiquid.class) 21 | public class MixinBlockLiquid { 22 | 23 | @Inject(method = "canCollideCheck", at = @At("HEAD"), cancellable = true) 24 | private void onCollideCheck(CallbackInfoReturnable callbackInfoReturnable) { 25 | if (Liquids.INSTANCE.getState()) 26 | callbackInfoReturnable.setReturnValue(true); 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlockSoulSand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.block; 7 | 8 | import net.minecraft.block.BlockSoulSand; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | import lol.liquidcat.features.module.modules.movement.NoSlow; 18 | 19 | @Mixin(BlockSoulSand.class) 20 | @SideOnly(Side.CLIENT) 21 | public class MixinBlockSoulSand { 22 | 23 | @Inject(method = "onEntityCollidedWithBlock", at = @At("HEAD"), cancellable = true) 24 | private void onEntityCollidedWithBlock(CallbackInfo callbackInfo) { 25 | final NoSlow noSlow = NoSlow.INSTANCE; 26 | 27 | if (noSlow.getState() && noSlow.getSoulsand()) 28 | callbackInfo.cancel(); 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlockWeb.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.block; 2 | 3 | import net.minecraft.block.BlockWeb; 4 | import net.minecraftforge.fml.relauncher.Side; 5 | import net.minecraftforge.fml.relauncher.SideOnly; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import lol.liquidcat.features.module.modules.movement.NoSlow; 13 | 14 | @Mixin(BlockWeb.class) 15 | @SideOnly(Side.CLIENT) 16 | public class MixinBlockWeb { 17 | 18 | @Inject(method = "onEntityCollidedWithBlock", at = @At("HEAD"), cancellable = true) 19 | private void onEntityCollidedWithBlock(CallbackInfo callbackInfo) { 20 | final NoSlow noSlow = NoSlow.INSTANCE; 21 | 22 | if (noSlow.getState() && noSlow.getWeb()) 23 | callbackInfo.cancel(); 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/client/MixinProfiler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.client; 7 | 8 | import net.minecraft.profiler.Profiler; 9 | 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | import lol.liquidcat.event.EventManager; 16 | import lol.liquidcat.event.Render2DEvent; 17 | import lol.liquidcat.utils.ClassUtils; 18 | 19 | @Mixin(Profiler.class) 20 | public class MixinProfiler { 21 | 22 | @Inject(method = "startSection", at = @At("HEAD")) 23 | private void startSection(String name, CallbackInfo callbackInfo) { 24 | if (name.equals("bossHealth") && ClassUtils.hasClass("net.labymod.api.LabyModAPI")) { 25 | // EventManager.callEvent(new Render2DEvent(0F)); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.entity; 7 | 8 | import com.mojang.authlib.GameProfile; 9 | 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.entity.player.PlayerCapabilities; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.util.FoodStats; 14 | 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Shadow; 17 | 18 | @Mixin(EntityPlayer.class) 19 | public abstract class MixinEntityPlayer extends MixinEntityLivingBase { 20 | 21 | @Shadow 22 | public abstract ItemStack getHeldItem(); 23 | 24 | @Shadow 25 | public abstract GameProfile getGameProfile(); 26 | 27 | @Shadow 28 | protected abstract boolean canTriggerWalking(); 29 | 30 | @Shadow 31 | protected abstract String getSwimSound(); 32 | 33 | @Shadow 34 | public abstract FoodStats getFoodStats(); 35 | 36 | @Shadow 37 | protected int flyToggleTimer; 38 | 39 | @Shadow 40 | public PlayerCapabilities capabilities; 41 | 42 | @Shadow 43 | public abstract int getItemInUseDuration(); 44 | 45 | @Shadow 46 | public abstract ItemStack getItemInUse(); 47 | 48 | @Shadow 49 | public abstract boolean isUsingItem(); 50 | 51 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiIngameMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.gui; 7 | 8 | import net.minecraft.client.gui.GuiButton; 9 | import net.minecraft.client.gui.GuiIngameMenu; 10 | 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | import lol.liquidcat.utils.ServerUtils; 17 | 18 | @Mixin(GuiIngameMenu.class) 19 | public abstract class MixinGuiIngameMenu extends MixinGuiScreen { 20 | 21 | @Inject(method = "initGui", at = @At("RETURN")) 22 | private void initGui(CallbackInfo callbackInfo) { 23 | if (!this.mc.isIntegratedServerRunning()) 24 | this.buttonList.add(new GuiButton(1337, this.width / 2 - 100, this.height / 4 + 128, "Reconnect")); 25 | } 26 | 27 | @Inject(method = "actionPerformed", at = @At("HEAD")) 28 | private void actionPerformed(GuiButton button, CallbackInfo callbackInfo) { 29 | if (button.id == 1337) { 30 | mc.theWorld.sendQuittingDisconnectingPacket(); 31 | ServerUtils.connectToLastServer(); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiKeyBindingList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.gui; 7 | 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.GuiKeyBindingList; 10 | import net.minecraft.client.gui.GuiSlot; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.Overwrite; 14 | 15 | @Mixin(GuiKeyBindingList.class) 16 | public abstract class MixinGuiKeyBindingList extends GuiSlot { 17 | 18 | public MixinGuiKeyBindingList(Minecraft mcIn, int width, int height, int topIn, int bottomIn, int slotHeightIn) { 19 | super(mcIn, width, height, topIn, bottomIn, slotHeightIn); 20 | } 21 | 22 | /** 23 | * @author CCBlueX 24 | */ 25 | @Overwrite 26 | protected int getScrollBarX() { 27 | return this.width - 5; 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiSpectator.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.gui; 2 | 3 | import net.ccbluex.liquidbounce.ui.font.AWTFontRenderer; 4 | import net.minecraft.client.gui.GuiSpectator; 5 | import net.minecraft.client.gui.ScaledResolution; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import lol.liquidcat.event.EventManager; 13 | import lol.liquidcat.event.Render2DEvent; 14 | 15 | @Mixin(GuiSpectator.class) 16 | public class MixinGuiSpectator { 17 | 18 | @Inject(method = "renderTooltip", at = @At("RETURN")) 19 | private void renderTooltip(ScaledResolution sr, float partialTicks, CallbackInfo callbackInfo) { 20 | EventManager.callEvent(new Render2DEvent(partialTicks)); 21 | AWTFontRenderer.Companion.garbageCollectionTick(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinServerSelectionList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.gui; 7 | 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.GuiSlot; 10 | import net.minecraft.client.gui.ServerSelectionList; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.Overwrite; 14 | 15 | @Mixin(ServerSelectionList.class) 16 | public abstract class MixinServerSelectionList extends GuiSlot { 17 | 18 | public MixinServerSelectionList(Minecraft mcIn, int width, int height, int topIn, int bottomIn, int slotHeightIn) { 19 | super(mcIn, width, height, topIn, bottomIn, slotHeightIn); 20 | } 21 | 22 | /** 23 | * @author CCBlueX 24 | */ 25 | @Overwrite 26 | protected int getScrollBarX() { 27 | return this.width - 5; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/item/MixinItemStack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.item; 7 | 8 | import net.ccbluex.liquidbounce.injection.implementations.IItemStack; 9 | import net.minecraft.item.ItemStack; 10 | 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | @Mixin(ItemStack.class) 17 | public class MixinItemStack implements IItemStack { 18 | 19 | private long itemDelay; 20 | 21 | @Inject(method = "(Lnet/minecraft/item/Item;IILnet/minecraft/nbt/NBTTagCompound;)V", at = @At("RETURN")) 22 | private void init(final CallbackInfo callbackInfo) { 23 | this.itemDelay = System.currentTimeMillis(); 24 | } 25 | 26 | @Override 27 | public long getItemDelay() { 28 | return itemDelay; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/network/MixinNetHandlerLoginClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.network; 7 | 8 | import net.minecraft.client.network.NetHandlerLoginClient; 9 | import net.minecraft.network.NetworkManager; 10 | import net.minecraft.network.login.server.S01PacketEncryptionRequest; 11 | import net.minecraftforge.fml.relauncher.Side; 12 | import net.minecraftforge.fml.relauncher.SideOnly; 13 | 14 | import org.spongepowered.asm.mixin.Final; 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Shadow; 17 | import org.spongepowered.asm.mixin.injection.At; 18 | import org.spongepowered.asm.mixin.injection.Inject; 19 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 20 | 21 | @Mixin(NetHandlerLoginClient.class) 22 | @SideOnly(Side.CLIENT) 23 | public class MixinNetHandlerLoginClient { 24 | 25 | @Shadow 26 | @Final 27 | private NetworkManager networkManager; 28 | 29 | @Inject(method = "handleEncryptionRequest", at = @At("HEAD"), cancellable = true) 30 | private void handleEncryptionRequest(S01PacketEncryptionRequest packetIn, CallbackInfo callbackInfo) { 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/network/MixinNetworkManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.network; 7 | 8 | import net.minecraft.network.NetworkManager; 9 | import net.minecraft.network.Packet; 10 | 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | import io.netty.channel.ChannelHandlerContext; 17 | import lol.liquidcat.event.EventManager; 18 | import lol.liquidcat.event.PacketEvent; 19 | 20 | @Mixin(NetworkManager.class) 21 | public class MixinNetworkManager { 22 | 23 | @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) 24 | private void read(ChannelHandlerContext context, Packet packet, CallbackInfo callback) { 25 | final PacketEvent event = new PacketEvent(packet); 26 | EventManager.callEvent(event); 27 | 28 | if(event.isCancelled()) 29 | callback.cancel(); 30 | } 31 | 32 | @Inject(method = "sendPacket(Lnet/minecraft/network/Packet;)V", at = @At("HEAD"), cancellable = true) 33 | private void send(Packet packet, CallbackInfo callback) { 34 | final PacketEvent event = new PacketEvent(packet); 35 | EventManager.callEvent(event); 36 | 37 | if(event.isCancelled()) 38 | callback.cancel(); 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/network/MixinNetworkPlayerInfo.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.network; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.network.NetworkPlayerInfo; 7 | import net.minecraft.client.resources.DefaultPlayerSkin; 8 | import net.minecraft.util.ResourceLocation; 9 | 10 | import org.spongepowered.asm.mixin.Final; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 16 | 17 | import java.util.Objects; 18 | 19 | import lol.liquidcat.features.module.modules.misc.NameProtect; 20 | 21 | @Mixin(NetworkPlayerInfo.class) 22 | public class MixinNetworkPlayerInfo { 23 | @Shadow 24 | @Final 25 | private GameProfile gameProfile; 26 | 27 | @Inject(method = "getLocationSkin", cancellable = true, at = @At("HEAD")) 28 | private void injectSkinProtect(CallbackInfoReturnable cir) { 29 | NameProtect nameProtect = NameProtect.INSTANCE; 30 | 31 | if (nameProtect.getState() && nameProtect.getSkinProtect()) { 32 | if (nameProtect.getAllPlayers() || Objects.equals(gameProfile.getId(), Minecraft.getMinecraft().getSession().getProfile().getId())) { 33 | cir.setReturnValue(DefaultPlayerSkin.getDefaultSkin(this.gameProfile.getId())); 34 | cir.cancel(); 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/packets/MixinC00Handshake.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.packets; 7 | 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.network.EnumConnectionState; 10 | import net.minecraft.network.PacketBuffer; 11 | import net.minecraft.network.handshake.client.C00Handshake; 12 | import net.minecraftforge.fml.relauncher.Side; 13 | import net.minecraftforge.fml.relauncher.SideOnly; 14 | 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Overwrite; 17 | import org.spongepowered.asm.mixin.Shadow; 18 | 19 | import lol.liquidcat.features.misc.AntiForge; 20 | 21 | @SideOnly(Side.CLIENT) 22 | @Mixin(C00Handshake.class) 23 | public class MixinC00Handshake { 24 | 25 | @Shadow 26 | private int protocolVersion; 27 | 28 | @Shadow 29 | public int port; 30 | 31 | @Shadow 32 | private EnumConnectionState requestedState; 33 | 34 | @Shadow 35 | public String ip; 36 | 37 | /** 38 | * @author CCBlueX 39 | */ 40 | @Overwrite 41 | public void writePacketData(PacketBuffer buf) { 42 | buf.writeVarIntToBuffer(this.protocolVersion); 43 | buf.writeString(this.ip + (AntiForge.enabled && AntiForge.blockFML && !Minecraft.getMinecraft().isIntegratedServerRunning() ? "" : "\0FML\0")); 44 | buf.writeShort(this.port); 45 | buf.writeVarIntToBuffer(this.requestedState.getId()); 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinEffectRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.particle.EffectRenderer; 9 | import net.minecraft.client.particle.EntityParticleEmitter; 10 | import net.minecraftforge.fml.relauncher.Side; 11 | import net.minecraftforge.fml.relauncher.SideOnly; 12 | 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.Overwrite; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | 17 | import java.util.ConcurrentModificationException; 18 | import java.util.Iterator; 19 | import java.util.List; 20 | 21 | @Mixin(EffectRenderer.class) 22 | @SideOnly(Side.CLIENT) 23 | public abstract class MixinEffectRenderer { 24 | 25 | @Shadow 26 | protected abstract void updateEffectLayer(int layer); 27 | 28 | @Shadow 29 | private List particleEmitters; 30 | 31 | /** 32 | * @author Mojang 33 | * @author Marco 34 | */ 35 | @Overwrite 36 | public void updateEffects() { 37 | try { 38 | for(int i = 0; i < 4; ++i) 39 | this.updateEffectLayer(i); 40 | 41 | for(final Iterator it = this.particleEmitters.iterator(); it.hasNext(); ) { 42 | final EntityParticleEmitter entityParticleEmitter = it.next(); 43 | 44 | entityParticleEmitter.onUpdate(); 45 | 46 | if(entityParticleEmitter.isDead) 47 | it.remove(); 48 | } 49 | }catch(final ConcurrentModificationException ignored) { 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinFontRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.gui.FontRenderer; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 15 | 16 | import lol.liquidcat.event.EventManager; 17 | import lol.liquidcat.event.TextEvent; 18 | 19 | @Mixin(FontRenderer.class) 20 | @SideOnly(Side.CLIENT) 21 | public class MixinFontRenderer { 22 | 23 | @ModifyVariable(method = "renderString", at = @At("HEAD"), ordinal = 0) 24 | private String renderString(final String string) { 25 | if (string == null) 26 | return string; 27 | 28 | final TextEvent textEvent = new TextEvent(string); 29 | EventManager.callEvent(textEvent); 30 | return textEvent.getText(); 31 | } 32 | 33 | @ModifyVariable(method = "getStringWidth", at = @At("HEAD"), ordinal = 0) 34 | private String getStringWidth(final String string) { 35 | if (string == null) 36 | return string; 37 | 38 | final TextEvent textEvent = new TextEvent(string); 39 | EventManager.callEvent(textEvent); 40 | return textEvent.getText(); 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinRender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.renderer.entity.Render; 9 | import net.minecraft.entity.Entity; 10 | 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | import lol.liquidcat.event.EventManager; 18 | import lol.liquidcat.event.RenderEntityEvent; 19 | 20 | @Mixin(Render.class) 21 | public abstract class MixinRender { 22 | 23 | @Shadow 24 | protected abstract boolean bindEntityTexture(T entity); 25 | 26 | @Inject(method = "doRender", at = @At("HEAD")) 27 | private void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo callbackInfo) { 28 | EventManager.callEvent(new RenderEntityEvent(entity, x, y, z, entityYaw, partialTicks)); 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinRenderEntityItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.renderer.entity.RenderEntityItem; 9 | 10 | import org.lwjgl.opengl.GL11; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | import lol.liquidcat.features.module.modules.render.Chams; 17 | 18 | @Mixin(RenderEntityItem.class) 19 | public class MixinRenderEntityItem { 20 | 21 | @Inject(method = "doRender", at = @At("HEAD")) 22 | private void injectChamsPre(CallbackInfo callbackInfo) { 23 | final Chams chams = Chams.INSTANCE; 24 | 25 | if (chams.getState() && chams.getItems()) { 26 | GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); 27 | GL11.glPolygonOffset(1.0F, -1000000F); 28 | } 29 | } 30 | 31 | @Inject(method = "doRender", at = @At("RETURN")) 32 | private void injectChamsPost(CallbackInfo callbackInfo) { 33 | final Chams chams = Chams.INSTANCE; 34 | 35 | if (chams.getState() && chams.getItems()) { 36 | GL11.glPolygonOffset(1.0F, 1000000F); 37 | GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinTileEntityChestRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.renderer.tileentity.TileEntityChestRenderer; 9 | 10 | import org.lwjgl.opengl.GL11; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | import lol.liquidcat.features.module.modules.render.Chams; 17 | 18 | @Mixin(TileEntityChestRenderer.class) 19 | public class MixinTileEntityChestRenderer { 20 | 21 | @Inject(method = "renderTileEntityAt", at = @At("HEAD")) 22 | private void injectChamsPre(CallbackInfo callbackInfo) { 23 | final Chams chams = Chams.INSTANCE; 24 | 25 | if (chams.getState() && chams.getChests()) { 26 | GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); 27 | GL11.glPolygonOffset(1.0F, -1000000F); 28 | } 29 | } 30 | 31 | @Inject(method = "renderTileEntityAt", at = @At("RETURN")) 32 | private void injectChamsPost(CallbackInfo callbackInfo) { 33 | final Chams chams = Chams.INSTANCE; 34 | 35 | if (chams.getState() && chams.getChests()) { 36 | GL11.glPolygonOffset(1.0F, 1000000F); 37 | GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinTileEntityMobSpawnerRenderer.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 2 | 3 | import net.minecraft.entity.Entity; 4 | import net.minecraft.entity.item.EntityPainting; 5 | import net.minecraft.tileentity.MobSpawnerBaseLogic; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(net.minecraft.client.renderer.tileentity.TileEntityMobSpawnerRenderer.class) 13 | public class MixinTileEntityMobSpawnerRenderer { 14 | 15 | @Inject(method = "renderMob", cancellable = true, at = @At("HEAD")) 16 | private static void injectPaintingSpawnerFix(MobSpawnerBaseLogic mobSpawnerLogic, double posX, double posY, double posZ, float partialTicks, CallbackInfo ci) { 17 | Entity entity = mobSpawnerLogic.func_180612_a(mobSpawnerLogic.getSpawnerWorld()); 18 | 19 | if (entity == null || entity instanceof EntityPainting) 20 | ci.cancel(); 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinTileEntityRendererDispatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; 9 | import net.minecraft.tileentity.TileEntity; 10 | 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | import lol.liquidcat.features.module.modules.render.XRay; 17 | 18 | @Mixin(TileEntityRendererDispatcher.class) 19 | public class MixinTileEntityRendererDispatcher { 20 | 21 | @Inject(method = "renderTileEntity", at = @At("HEAD"), cancellable = true) 22 | private void renderTileEntity(TileEntity tileentityIn, float partialTicks, int destroyStage, final CallbackInfo callbackInfo) { 23 | final XRay xray = XRay.INSTANCE; 24 | 25 | if (xray.getState() && !xray.getXrayBlocks().contains(tileentityIn.getBlockType())) 26 | callbackInfo.cancel(); 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/render/MixinVisGraph.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.render; 7 | 8 | import net.minecraft.client.renderer.chunk.VisGraph; 9 | 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | import lol.liquidcat.features.module.modules.render.XRay; 16 | 17 | @Mixin(VisGraph.class) 18 | public class MixinVisGraph { 19 | 20 | @Inject(method = "func_178606_a", at = @At("HEAD"), cancellable = true) 21 | private void func_178606_a(final CallbackInfo callbackInfo) { 22 | if (XRay.INSTANCE.getState()) 23 | callbackInfo.cancel(); 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/resources/MixinSkinManager.java: -------------------------------------------------------------------------------- 1 | package net.ccbluex.liquidbounce.injection.forge.mixins.resources; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | import com.mojang.authlib.minecraft.MinecraftProfileTexture; 5 | 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.client.resources.SkinManager; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | import java.util.Objects; 17 | 18 | import lol.liquidcat.features.module.modules.misc.NameProtect; 19 | 20 | @Mixin(SkinManager.class) 21 | public class MixinSkinManager { 22 | 23 | @Inject(method = "loadSkinFromCache", cancellable = true, at = @At("HEAD")) 24 | private void injectSkinProtect(GameProfile gameProfile, CallbackInfoReturnable> cir) { 25 | if (gameProfile == null) 26 | return; 27 | 28 | NameProtect nameProtect = NameProtect.INSTANCE; 29 | 30 | if (nameProtect.getState() && nameProtect.getSkinProtect()) { 31 | if (nameProtect.getAllPlayers() || Objects.equals(gameProfile.getId(), Minecraft.getMinecraft().getSession().getProfile().getId())) { 32 | cir.setReturnValue(new HashMap<>()); 33 | cir.cancel(); 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/world/MixinWorld.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.world; 7 | 8 | import net.minecraft.block.state.IBlockState; 9 | import net.minecraft.util.BlockPos; 10 | import net.minecraft.world.World; 11 | 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.Shadow; 14 | 15 | @Mixin(World.class) 16 | public abstract class MixinWorld { 17 | 18 | @Shadow 19 | public abstract IBlockState getBlockState(BlockPos pos); 20 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/world/MixinWorldClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.forge.mixins.world; 7 | 8 | import net.minecraft.client.multiplayer.WorldClient; 9 | 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 13 | 14 | import lol.liquidcat.features.module.modules.render.TrueSight; 15 | 16 | @Mixin(WorldClient.class) 17 | public class MixinWorldClient { 18 | 19 | @ModifyVariable(method = "doVoidFogParticles", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/world/World;Lnet/minecraft/util/BlockPos;Lnet/minecraft/block/state/IBlockState;Ljava/util/Random;)V", shift = At.Shift.AFTER), ordinal = 0) 20 | private boolean handleBarriers(final boolean flag) { 21 | final TrueSight trueSight = TrueSight.INSTANCE; 22 | 23 | return flag || trueSight.getState() && trueSight.getBarriers(); 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/implementations/IItemStack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.injection.implementations; 7 | 8 | public interface IItemStack { 9 | long getItemDelay(); 10 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/injection/implementations/IMixinGuiSlot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | 7 | package net.ccbluex.liquidbounce.injection.implementations; 8 | 9 | public interface IMixinGuiSlot { 10 | 11 | void setListWidth(int listWidth); 12 | 13 | void setEnableScissor(boolean b); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/script/api/ScriptCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.script.api 7 | 8 | import jdk.nashorn.api.scripting.JSObject 9 | import jdk.nashorn.api.scripting.ScriptUtils 10 | import lol.liquidcat.LiquidCat 11 | import lol.liquidcat.features.command.Command 12 | 13 | @Suppress("UNCHECKED_CAST", "unused") 14 | class ScriptCommand(private val commandObject: JSObject) : Command(commandObject.getMember("name") as String, 15 | ScriptUtils.convert(commandObject.getMember("aliases"), Array::class.java) as Array) { 16 | 17 | private val events = HashMap() 18 | 19 | /** 20 | * Called from inside the script to register a new event handler. 21 | * @param eventName Name of the event. 22 | * @param handler JavaScript function used to handle the event. 23 | */ 24 | fun on(eventName: String, handler: JSObject) { 25 | events[eventName] = handler 26 | } 27 | 28 | override fun execute(args: Array) { 29 | try { 30 | events["execute"]?.call(commandObject, args) 31 | } catch (throwable: Throwable) { 32 | LiquidCat.logger.error("[ScriptAPI] Exception in command '$command'!", throwable) 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/script/api/ScriptTab.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.script.api 7 | 8 | import jdk.nashorn.api.scripting.JSObject 9 | import jdk.nashorn.api.scripting.ScriptUtils 10 | import net.minecraft.creativetab.CreativeTabs 11 | import net.minecraft.init.Items 12 | import net.minecraft.item.Item 13 | import net.minecraft.item.ItemStack 14 | 15 | @Suppress("UNCHECKED_CAST", "unused") 16 | class ScriptTab(private val tabObject: JSObject) : CreativeTabs(tabObject.getMember("name") as String) { 17 | 18 | val items = ScriptUtils.convert(tabObject.getMember("items"), Array::class.java) as Array 19 | 20 | override fun getTabIconItem() = Items::class.java.getField(tabObject.getMember("icon") as String).get(null) as Item 21 | 22 | override fun getTranslatedTabLabel() = tabObject.getMember("name") as String 23 | 24 | override fun displayAllReleventItems(p_78018_1_: MutableList?) { 25 | items.forEach { p_78018_1_?.add(it) } 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/script/api/global/Chat.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.script.api.global 7 | 8 | import lol.liquidcat.utils.msg 9 | 10 | /** 11 | * Object used by the script API to provide an easier way of calling chat-related methods. 12 | */ 13 | object Chat { 14 | 15 | /** 16 | * Prints a message to the chat (client-side) 17 | * @param message Message to be printed 18 | */ 19 | @Suppress("unused") 20 | @JvmStatic 21 | fun print(message : String) { 22 | msg(message) 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/script/remapper/injection/utils/ClassUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.script.remapper.injection.utils 7 | 8 | import org.objectweb.asm.ClassReader 9 | import org.objectweb.asm.ClassWriter 10 | import org.objectweb.asm.tree.ClassNode 11 | 12 | /** 13 | * A bytecode class reader and writer util 14 | * 15 | * @author CCBlueX 16 | */ 17 | object ClassUtils { 18 | 19 | /** 20 | * Read bytes to class node 21 | * 22 | * @param bytes ByteArray of class 23 | */ 24 | fun toClassNode(bytes : ByteArray) : ClassNode { 25 | val classReader = ClassReader(bytes) 26 | val classNode = ClassNode() 27 | classReader.accept(classNode, 0) 28 | 29 | return classNode 30 | } 31 | 32 | /** 33 | * Write class node to bytes 34 | * 35 | * @param classNode ClassNode of class 36 | */ 37 | fun toBytes(classNode : ClassNode) : ByteArray { 38 | val classWriter = ClassWriter(ClassWriter.COMPUTE_MAXS) 39 | classNode.accept(classWriter) 40 | 41 | return classWriter.toByteArray() 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/script/remapper/injection/utils/NodeUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.script.remapper.injection.utils 7 | 8 | import org.objectweb.asm.tree.AbstractInsnNode 9 | import org.objectweb.asm.tree.InsnList 10 | 11 | /** 12 | * A bytecode node util 13 | * 14 | * @author CCBlueX 15 | */ 16 | object NodeUtils { 17 | 18 | /** 19 | * Lazy. 20 | */ 21 | fun toNodes(vararg nodes : AbstractInsnNode) : InsnList { 22 | val insnList = InsnList() 23 | for(node in nodes) 24 | insnList.add(node) 25 | return insnList 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/client/GuiModsMenu.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.ui.client 7 | 8 | import net.minecraft.client.gui.GuiButton 9 | import net.minecraft.client.gui.GuiScreen 10 | import net.minecraftforge.fml.client.GuiModList 11 | import org.lwjgl.input.Keyboard 12 | 13 | class GuiModsMenu(private val prevGui: GuiScreen) : GuiScreen() { 14 | 15 | override fun initGui() { 16 | buttonList.add(GuiButton(0, width / 2 - 100, height / 4 + 48, "Forge Mods")) 17 | buttonList.add(GuiButton(1, width / 2 - 100, height / 4 + 48 + 25, "Scripts")) 18 | buttonList.add(GuiButton(2, width / 2 - 100, height / 4 + 48 + 50, "Back")) 19 | } 20 | 21 | override fun actionPerformed(button: GuiButton) { 22 | when (button.id) { 23 | 0 -> mc.displayGuiScreen(GuiModList(this)) 24 | 1 -> mc.displayGuiScreen(GuiScripts(this)) 25 | 2 -> mc.displayGuiScreen(prevGui) 26 | } 27 | } 28 | 29 | override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) { 30 | drawBackground(0) 31 | 32 | super.drawScreen(mouseX, mouseY, partialTicks) 33 | } 34 | 35 | override fun keyTyped(typedChar: Char, keyCode: Int) { 36 | if (Keyboard.KEY_ESCAPE == keyCode) { 37 | mc.displayGuiScreen(prevGui) 38 | return 39 | } 40 | 41 | super.keyTyped(typedChar, keyCode) 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/client/clickgui/elements/ButtonElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.ui.client.clickgui.elements; 7 | 8 | import net.minecraftforge.fml.relauncher.Side; 9 | import net.minecraftforge.fml.relauncher.SideOnly; 10 | 11 | import lol.liquidcat.LiquidCat; 12 | 13 | @SideOnly(Side.CLIENT) 14 | public class ButtonElement extends Element { 15 | 16 | protected String displayName; 17 | protected int color = 0xffffff; 18 | 19 | public int hoverTime; 20 | 21 | public ButtonElement(String displayName) { 22 | createButton(displayName); 23 | } 24 | 25 | public void createButton(String displayName) { 26 | this.displayName = displayName; 27 | } 28 | 29 | @Override 30 | public void drawScreen(int mouseX, int mouseY, float button) { 31 | LiquidCat.clickGui.style.drawButtonElement(mouseX, mouseY, this); 32 | super.drawScreen(mouseX, mouseY, button); 33 | } 34 | 35 | @Override 36 | public int getHeight() { 37 | return 16; 38 | } 39 | 40 | public boolean isHovering(int mouseX, int mouseY) { 41 | return mouseX >= getX() && mouseX <= getX() + getWidth() && mouseY >= getY() && mouseY <= getY() + 16; 42 | } 43 | 44 | public String getDisplayName() { 45 | return displayName; 46 | } 47 | 48 | public void setColor(int color) { 49 | this.color = color; 50 | } 51 | 52 | public int getColor() { 53 | return color; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/client/clickgui/elements/Element.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.ui.client.clickgui.elements; 7 | 8 | import net.ccbluex.liquidbounce.utils.MinecraftInstance; 9 | 10 | public class Element extends MinecraftInstance { 11 | 12 | private int x; 13 | private int y; 14 | private int width; 15 | private int height; 16 | private boolean visible; 17 | 18 | public void setLocation(int x, int y) { 19 | this.x = x; 20 | this.y = y; 21 | } 22 | 23 | public void drawScreen(int mouseX, int mouseY, float button) { 24 | } 25 | 26 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 27 | } 28 | 29 | public void mouseReleased(int mouseX, int mouseY, int state) { 30 | } 31 | 32 | public int getX() { 33 | return x; 34 | } 35 | 36 | public void setX(int x) { 37 | this.x = x; 38 | } 39 | 40 | public int getY() { 41 | return y; 42 | } 43 | 44 | public void setY(int y) { 45 | this.y = y; 46 | } 47 | 48 | public int getWidth() { 49 | return width; 50 | } 51 | 52 | public void setWidth(int width) { 53 | this.width = width; 54 | } 55 | 56 | public int getHeight() { 57 | return height; 58 | } 59 | 60 | public void setHeight(int height) { 61 | this.height = height; 62 | } 63 | 64 | public boolean isVisible() { 65 | return visible; 66 | } 67 | 68 | public void setVisible(boolean visible) { 69 | this.visible = visible; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/client/clickgui/style/Style.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.ui.client.clickgui.style; 7 | 8 | import net.ccbluex.liquidbounce.ui.client.clickgui.Panel; 9 | import net.ccbluex.liquidbounce.ui.client.clickgui.elements.ButtonElement; 10 | import net.ccbluex.liquidbounce.ui.client.clickgui.elements.ModuleElement; 11 | import net.ccbluex.liquidbounce.utils.MinecraftInstance; 12 | 13 | public abstract class Style extends MinecraftInstance { 14 | 15 | public abstract void drawPanel(final int mouseX, final int mouseY, final Panel panel); 16 | 17 | public abstract void drawDescription(final int mouseX, final int mouseY, final String text); 18 | 19 | public abstract void drawButtonElement(final int mouseX, final int mouseY, final ButtonElement buttonElement); 20 | 21 | public abstract void drawModuleElement(final int mouseX, final int mouseY, final ModuleElement moduleElement); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/font/CachedFont.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | 7 | package net.ccbluex.liquidbounce.ui.font 8 | 9 | import org.lwjgl.opengl.GL11 10 | 11 | data class CachedFont(val displayList: Int, var lastUsage: Long, var deleted: Boolean = false) { 12 | protected fun finalize() { 13 | if (!deleted) { 14 | GL11.glDeleteLists(displayList, 1) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/ui/font/FontDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.ui.font; 7 | 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface FontDetails { 13 | 14 | String fontName(); 15 | 16 | int fontSize() default -1; 17 | } -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/utils/MinecraftInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.utils; 7 | 8 | import net.minecraft.client.Minecraft; 9 | 10 | //TODO Remove when everything is converted to Kotlin 11 | 12 | public class MinecraftInstance { 13 | protected static final Minecraft mc = Minecraft.getMinecraft(); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/net/ccbluex/liquidbounce/utils/TabUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package net.ccbluex.liquidbounce.utils; 7 | 8 | import net.minecraft.client.gui.GuiTextField; 9 | 10 | public final class TabUtils { 11 | 12 | public static void tab(final GuiTextField... textFields) { 13 | for(int i = 0; i < textFields.length; i++) { 14 | final GuiTextField textField = textFields[i]; 15 | 16 | if(textField.isFocused()) { 17 | textField.setFocused(false); 18 | i++; 19 | 20 | if(i >= textFields.length) 21 | i = 0; 22 | 23 | textFields[i].setFocused(true); 24 | break; 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/chat/ClientListener.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.chat 7 | 8 | import lol.liquidcat.chat.packet.packets.Packet 9 | 10 | interface ClientListener { 11 | 12 | /** 13 | * Handle connect to web socket 14 | */ 15 | fun onConnect() 16 | 17 | /** 18 | * Handle connect to web socket 19 | */ 20 | fun onConnected() 21 | 22 | /** 23 | * Handle handshake 24 | */ 25 | fun onHandshake(success: Boolean) 26 | 27 | /** 28 | * Handle disconnect 29 | */ 30 | fun onDisconnect() 31 | 32 | /** 33 | * Handle logon to web socket with minecraft account 34 | */ 35 | fun onLogon() 36 | 37 | /** 38 | * Handle incoming packets 39 | */ 40 | fun onPacket(packet: Packet) 41 | 42 | /** 43 | * Handle error 44 | */ 45 | fun onError(cause: Throwable) 46 | 47 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/chat/User.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.chat 7 | 8 | import com.google.gson.annotations.SerializedName 9 | import java.util.* 10 | 11 | /** 12 | * A axochat user 13 | * 14 | * @param name of user 15 | * @param uuid of user 16 | */ 17 | data class User( 18 | @SerializedName("name") 19 | val name: String, 20 | 21 | @SerializedName("uuid") 22 | val uuid: UUID 23 | ) -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/chat/packet/SerializedPacket.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.chat.packet 7 | 8 | import com.google.gson.annotations.SerializedName 9 | import lol.liquidcat.chat.packet.packets.Packet 10 | 11 | /** 12 | * Serialized packet 13 | * 14 | * @param packetName name of packet 15 | * @param packetContent content of packet 16 | */ 17 | data class SerializedPacket( 18 | @SerializedName("m") 19 | val packetName: String, 20 | 21 | @SerializedName("c") 22 | val packetContent: Packet? 23 | ) -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/chat/packet/packets/Packet.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.chat.packet.packets 7 | 8 | /** 9 | * A axochat packet 10 | */ 11 | interface Packet -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/event/Event.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.event 7 | 8 | open class Event 9 | 10 | open class CancellableEvent : Event() { 11 | 12 | /** 13 | * Let you know if the event is cancelled 14 | * 15 | * @return state of cancel 16 | */ 17 | var isCancelled: Boolean = false 18 | private set 19 | 20 | /** 21 | * Cancels event 22 | */ 23 | fun cancelEvent() { 24 | isCancelled = true 25 | } 26 | } 27 | 28 | enum class EventState(val stateName: String) { 29 | PRE("PRE"), POST("POST") 30 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/event/Listenable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.event 7 | 8 | import java.lang.reflect.Method 9 | 10 | interface Listenable { 11 | fun handleEvents(): Boolean 12 | } 13 | 14 | @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) 15 | @kotlin.annotation.Retention(AnnotationRetention.RUNTIME) 16 | annotation class EventTarget(val ignoreCondition: Boolean = false) 17 | 18 | internal class EventHook(val eventClass: Listenable, val method: Method, eventTarget: EventTarget) { 19 | val isIgnoreCondition = eventTarget.ignoreCondition 20 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/BindCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.features.module.ModuleManager 10 | import org.lwjgl.input.Keyboard 11 | 12 | object BindCommand : Command("bind", emptyArray()) { 13 | /** 14 | * Execute commands with provided [args] 15 | */ 16 | override fun execute(args: Array) { 17 | if (args.size > 2) { 18 | // Get module by name 19 | val module = ModuleManager.getModule(args[1]) 20 | 21 | if (module == null) { 22 | chat("Module §a§l" + args[1] + "§3 not found.") 23 | return 24 | } 25 | // Find key by name and change 26 | val key = Keyboard.getKeyIndex(args[2].uppercase()) 27 | module.keyBind = key 28 | 29 | // Response to user 30 | chat("Bound module §a§l${module.name}§3 to key §a§l${Keyboard.getKeyName(key)}§3.") 31 | playEdit() 32 | return 33 | } 34 | 35 | chatSyntax(arrayOf(" ", " none")) 36 | } 37 | 38 | override fun tabComplete(args: Array): List { 39 | if (args.isEmpty()) return emptyList() 40 | 41 | val moduleName = args[0] 42 | 43 | return when (args.size) { 44 | 1 -> ModuleManager.modules 45 | .map { it.name } 46 | .filter { it.startsWith(moduleName, true) } 47 | .toList() 48 | else -> emptyList() 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/BindsCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.features.module.ModuleManager 10 | import lol.liquidcat.utils.msg 11 | import org.lwjgl.input.Keyboard 12 | 13 | object BindsCommand : Command("binds", emptyArray()) { 14 | /** 15 | * Execute commands with provided [args] 16 | */ 17 | override fun execute(args: Array) { 18 | if (args.size > 1) { 19 | if (args[1].equals("clear", true)) { 20 | for (module in ModuleManager.modules) 21 | module.keyBind = Keyboard.KEY_NONE 22 | 23 | chat("Removed all binds.") 24 | return 25 | } 26 | } 27 | 28 | chat("§c§lBinds") 29 | ModuleManager.modules.filter { it.keyBind != Keyboard.KEY_NONE }.forEach { 30 | msg("§6> §c${it.name}: §a§l${Keyboard.getKeyName(it.keyBind)}") 31 | } 32 | chatSyntax("binds clear") 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/HClipCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.utils.entity.forward 10 | 11 | object HClipCommand : Command("hclip", emptyArray()) { 12 | 13 | /** 14 | * Execute commands with provided [args] 15 | */ 16 | override fun execute(args: Array) { 17 | if (args.size > 1) { 18 | try { 19 | mc.thePlayer.forward(args[1].toDouble()) 20 | chat("You were teleported.") 21 | } catch (exception: NumberFormatException) { 22 | chatSyntaxError() 23 | } 24 | return 25 | } 26 | 27 | chatSyntax("hclip ") 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/HurtCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.utils.sendPacket 10 | import net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition 11 | 12 | object HurtCommand : Command("hurt", emptyArray()) { 13 | /** 14 | * Execute commands with provided [args] 15 | */ 16 | override fun execute(args: Array) { 17 | var damage = 1 18 | 19 | if (args.size > 1) { 20 | try { 21 | damage = args[1].toInt() 22 | } catch (ignored: NumberFormatException) { 23 | chatSyntaxError() 24 | return 25 | } 26 | } 27 | 28 | // Latest NoCheatPlus damage exploit 29 | val x = mc.thePlayer.posX 30 | val y = mc.thePlayer.posY 31 | val z = mc.thePlayer.posZ 32 | 33 | for (i in 0 until 65 * damage) { 34 | sendPacket(C04PacketPlayerPosition(x, y + 0.049, z, false)) 35 | sendPacket(C04PacketPlayerPosition(x, y, z, false)) 36 | } 37 | sendPacket(C04PacketPlayerPosition(x, y, z, true)) 38 | 39 | // Output message 40 | chat("You were damaged.") 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/LoginCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.utils.ServerUtils 10 | import lol.liquidcat.utils.login.MinecraftAccount 11 | import net.ccbluex.liquidbounce.ui.client.altmanager.GuiAltManager 12 | 13 | object LoginCommand : Command("login", emptyArray()) { 14 | /** 15 | * Execute commands with provided [args] 16 | */ 17 | override fun execute(args: Array) { 18 | if (args.size <= 1) { 19 | chatSyntax("login [password]") 20 | return 21 | } 22 | 23 | val result: String = if (args.size > 2) 24 | GuiAltManager.login(MinecraftAccount(args[1], args[2])) 25 | else 26 | GuiAltManager.login(MinecraftAccount(args[1])) 27 | 28 | chat(result) 29 | 30 | if (result.startsWith("§cYour name is now")) { 31 | if (mc.isIntegratedServerRunning) 32 | return 33 | 34 | mc.theWorld.sendQuittingDisconnectingPacket() 35 | ServerUtils.connectToLastServer() 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/PingCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | 10 | object PingCommand : Command("ping", emptyArray()) { 11 | override fun execute(args: Array) { 12 | chat("§3Your ping is §a${mc.netHandler.getPlayerInfo(mc.thePlayer.uniqueID).responseTime}ms§3.") 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/PrefixCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.features.command.CommandManager 10 | import lol.liquidcat.file.FileManager 11 | import lol.liquidcat.file.configs.ValuesConfig 12 | 13 | object PrefixCommand : Command("prefix", emptyArray()) { 14 | /** 15 | * Execute commands with provided [args] 16 | */ 17 | override fun execute(args: Array) { 18 | if (args.size <= 1) { 19 | chatSyntax("prefix ") 20 | return 21 | } 22 | 23 | val prefix = args[1] 24 | 25 | if (prefix.length > 1) { 26 | chat("§cPrefix can only be one character long!") 27 | return 28 | } 29 | 30 | CommandManager.prefix = prefix.single() 31 | FileManager.saveConfig(ValuesConfig) 32 | 33 | chat("Successfully changed command prefix to '§8$prefix§3'") 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/RemoteViewCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.features.command.CommandManager 10 | 11 | object RemoteViewCommand : Command("remoteview", arrayOf("rv")) { 12 | /** 13 | * Execute commands with provided [args] 14 | */ 15 | override fun execute(args: Array) { 16 | if (args.size < 2) { 17 | if (mc.renderViewEntity != mc.thePlayer) { 18 | mc.renderViewEntity = mc.thePlayer 19 | return 20 | } 21 | chatSyntax("remoteview ") 22 | return 23 | } 24 | 25 | val targetName = args[1] 26 | 27 | for (entity in mc.theWorld.loadedEntityList) { 28 | if (targetName == entity.name) { 29 | mc.renderViewEntity = entity 30 | chat("Now viewing perspective of §8${entity.name}§3.") 31 | chat("Execute §8${CommandManager.prefix}remoteview §3again to go back to yours.") 32 | break 33 | } 34 | } 35 | } 36 | 37 | override fun tabComplete(args: Array): List { 38 | if (args.isEmpty()) return emptyList() 39 | 40 | return when (args.size) { 41 | 1 -> return mc.theWorld.playerEntities 42 | .map { it.name } 43 | .filter { it.startsWith(args[0], true) } 44 | else -> emptyList() 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/RenameCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.utils.render.color.ColorUtils 10 | import lol.liquidcat.utils.StringUtils 11 | 12 | object RenameCommand : Command("rename", emptyArray()) { 13 | /** 14 | * Execute commands with provided [args] 15 | */ 16 | override fun execute(args: Array) { 17 | if (args.size > 1) { 18 | if (mc.playerController.isNotCreative) { 19 | chat("§c§lError: §3You need to be in creative mode.") 20 | return 21 | } 22 | 23 | val item = mc.thePlayer.heldItem 24 | if (item == null || item.item == null) { 25 | chat("§c§lError: §3You need to hold a item.") 26 | return 27 | } 28 | 29 | item.setStackDisplayName(ColorUtils.translateAlternateColorCodes(StringUtils.toCompleteString(args, 1))) 30 | chat("§3Item renamed to '${item.displayName}§3'") 31 | return 32 | } 33 | 34 | chatSyntax("rename ") 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/SayCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.utils.StringUtils 10 | 11 | object SayCommand : Command("say", emptyArray()) { 12 | /** 13 | * Execute commands with provided [args] 14 | */ 15 | override fun execute(args: Array) { 16 | if (args.size > 1) { 17 | mc.thePlayer.sendChatMessage(StringUtils.toCompleteString(args, 1)) 18 | chat("Message was sent to the chat.") 19 | return 20 | } 21 | chatSyntax("say ") 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/ServerInfoCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.event.EventManager 9 | import lol.liquidcat.event.EventTarget 10 | import lol.liquidcat.event.Listenable 11 | import lol.liquidcat.event.PacketEvent 12 | import lol.liquidcat.features.command.Command 13 | import net.minecraft.network.handshake.client.C00Handshake 14 | 15 | object ServerInfoCommand : Command("serverinfo", emptyArray()), Listenable { 16 | init { 17 | EventManager.registerListener(this) 18 | } 19 | 20 | private var ip = "" 21 | private var port = 0 22 | 23 | /** 24 | * Execute commands with provided [args] 25 | */ 26 | override fun execute(args: Array) { 27 | if (mc.currentServerData == null) { 28 | chat("This command does not work in single player.") 29 | return 30 | } 31 | 32 | val data = mc.currentServerData 33 | 34 | chat("Server infos:") 35 | chat("§7Name: §8${data.serverName}") 36 | chat("§7IP: §8$ip:$port") 37 | chat("§7Players: §8${data.populationInfo}") 38 | chat("§7MOTD: §8${data.serverMOTD}") 39 | chat("§7ServerVersion: §8${data.gameVersion}") 40 | chat("§7ProtocolVersion: §8${data.version}") 41 | chat("§7Ping: §8${data.pingToServer}") 42 | } 43 | 44 | @EventTarget 45 | fun onPacket(event: PacketEvent) { 46 | val packet = event.packet 47 | 48 | if (packet is C00Handshake) { 49 | ip = packet.ip 50 | port = packet.port 51 | } 52 | } 53 | 54 | override fun handleEvents() = true 55 | } -------------------------------------------------------------------------------- /src/main/kotlin/lol/liquidcat/features/command/commands/ShortcutCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * LiquidCat Hacked Client 3 | * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. 4 | * https://github.com/CatsDevelopment/LiquidCat 5 | */ 6 | package lol.liquidcat.features.command.commands 7 | 8 | import lol.liquidcat.features.command.Command 9 | import lol.liquidcat.features.command.CommandManager 10 | import lol.liquidcat.utils.StringUtils 11 | 12 | object ShortcutCommand: Command("shortcut", arrayOf()) { 13 | /** 14 | * Execute commands with provided [args] 15 | */ 16 | override fun execute(args: Array) { 17 | when { 18 | args.size > 3 && args[1].equals("add", true) -> { 19 | try { 20 | CommandManager.registerShortcut(args[2], 21 | StringUtils.toCompleteString(args, 3)) 22 | 23 | chat("Successfully added shortcut.") 24 | } catch (e: IllegalArgumentException) { 25 | chat(e.message!!) 26 | } 27 | } 28 | 29 | args.size >= 3 && args[1].equals("remove", true) -> { 30 | if (CommandManager.unregisterShortcut(args[2])) 31 | chat("Successfully removed shortcut.") 32 | else 33 | chat("Shortcut does not exist.") 34 | } 35 | 36 | else -> chat("shortcut