├── src └── main │ ├── resources │ ├── assets │ │ ├── misericordia │ │ │ ├── shaders │ │ │ │ ├── galaxy.frag │ │ │ │ └── vertex.vert │ │ │ ├── icon16.png │ │ │ └── icon32.png │ │ └── minecraft │ │ │ └── textures │ │ │ ├── texture │ │ │ └── img.png │ │ │ └── icons │ │ │ ├── multiplayer.png │ │ │ └── singleplayer.png │ ├── mcmod.info │ └── mixins.misericordia.json │ └── java │ └── halq │ └── misericordia │ └── fun │ ├── executor │ ├── modules │ │ ├── render │ │ │ ├── Trajectories.java │ │ │ ├── chams │ │ │ │ ├── playerchams │ │ │ │ │ └── PlayerChams.java │ │ │ │ └── crystalchams │ │ │ │ │ └── CrystalChamsModule.java │ │ │ ├── HandChams.java │ │ │ ├── NoRender.java │ │ │ ├── FullBright.java │ │ │ ├── fallpredict │ │ │ │ ├── module │ │ │ │ │ └── FallPredictModule.java │ │ │ │ └── FallPredictCalcs.java │ │ │ ├── CrossHair.java │ │ │ ├── Breadcrumbs.java │ │ │ ├── tracers │ │ │ │ ├── TracersRender.java │ │ │ │ └── Tracers.java │ │ │ └── BlockHighlight.java │ │ ├── combat │ │ │ ├── crystalaura │ │ │ │ ├── CrystalAuraSwitch.java │ │ │ │ ├── CrystalAuraRotations.java │ │ │ │ ├── calcs │ │ │ │ │ ├── CrystalAuraCalcPos.java │ │ │ │ │ └── CrystalAuraCalcDamage.java │ │ │ │ ├── CrystalAuraPredict.java │ │ │ │ └── module │ │ │ │ │ └── CrystalAuraSettings.java │ │ │ ├── WebBreaker.java │ │ │ ├── trap │ │ │ │ ├── SelfTrap.java │ │ │ │ └── TrapPositions.java │ │ │ ├── anvilaura │ │ │ │ └── AnvilAura.java │ │ │ ├── surround │ │ │ │ ├── SurroundPos.java │ │ │ │ └── SurroundRender.java │ │ │ ├── holefiller │ │ │ │ └── module │ │ │ │ │ └── HoleFillerModule.java │ │ │ ├── killaura │ │ │ │ ├── CheaseAI.java │ │ │ │ └── KillAuraRender.java │ │ │ └── aimbot │ │ │ │ └── AimBot.java │ │ ├── world │ │ │ ├── Scaffold.java │ │ │ ├── FastEat.java │ │ │ └── Notifier.java │ │ ├── movement │ │ │ ├── Jesus.java │ │ │ ├── NoFall.java │ │ │ ├── NoSlow.java │ │ │ ├── AntiWeb.java │ │ │ ├── AutoWalk.java │ │ │ ├── Velocity.java │ │ │ ├── CreativeFly.java │ │ │ ├── FastSwim.java │ │ │ ├── ReverseStep.java │ │ │ ├── ElytraFly.java │ │ │ ├── NoClip.java │ │ │ ├── Step.java │ │ │ └── Sprint.java │ │ ├── exploits │ │ │ ├── Timer.java │ │ │ ├── FreeCam.java │ │ │ ├── AutoMount.java │ │ │ ├── MultiTask.java │ │ │ ├── PingSpoof.java │ │ │ ├── FakeCreative.java │ │ │ ├── AutoFrameDupe.java │ │ │ └── Burrow.java │ │ ├── miscellaneous │ │ │ ├── AutoXp.java │ │ │ ├── AutoGG.java │ │ │ ├── AntiHunger.java │ │ │ ├── AutoArmor.java │ │ │ ├── AutoClicker.java │ │ │ ├── Spammer.java │ │ │ ├── AntiAfk.java │ │ │ ├── FastUse.java │ │ │ ├── ChatSuffix.java │ │ │ ├── PacketPearl.java │ │ │ └── FakePlayer.java │ │ └── client │ │ │ ├── CustomFont.java │ │ │ ├── Console.java │ │ │ ├── Script.java │ │ │ ├── Colors.java │ │ │ └── InteligentGui.java │ ├── commands │ │ ├── Save.java │ │ ├── Help.java │ │ ├── Toggle.java │ │ └── Bind.java │ ├── settings │ │ ├── SettingString.java │ │ ├── SettingBoolean.java │ │ ├── SettingCategory.java │ │ ├── SettingScreen.java │ │ ├── SettingDouble.java │ │ ├── SettingInteger.java │ │ ├── SettingMode.java │ │ └── SettingColor.java │ └── Misercordia.java │ ├── utils │ ├── IRenderManager.java │ ├── Minecraftable.java │ └── utils │ │ ├── IconsUtil.java │ │ ├── ColorUtil.java │ │ ├── TimerUtil.java │ │ ├── GeometryMasks.java │ │ └── MessageUtil.java │ ├── gui │ ├── igui │ │ ├── components │ │ │ ├── Component.java │ │ │ ├── modoptionstab │ │ │ │ ├── Options.java │ │ │ │ └── options │ │ │ │ │ └── ColorOptions.java │ │ │ ├── settings │ │ │ │ ├── SettingScreenComponent.java │ │ │ │ ├── ModeComponent.java │ │ │ │ ├── CategorySettingComponent.java │ │ │ │ ├── BooleanComponent.java │ │ │ │ ├── NumberIntComponent.java │ │ │ │ └── NumberComponent.java │ │ │ └── particles │ │ │ │ ├── Particles.java │ │ │ │ └── Particle.java │ │ └── ClickGuiScreen.java │ ├── guibars │ │ ├── ClickBar.java │ │ └── RenderBar.java │ ├── console │ │ ├── core │ │ │ ├── ConsoleAPI.java │ │ │ ├── TabComplete.java │ │ │ └── ConsoleScript.java │ │ └── ConsoleScreen.java │ └── main │ │ └── GuiMainMenuScreen.java │ ├── core │ ├── modulecore │ │ └── Category.java │ ├── update │ │ └── MainMenuBackground.java │ ├── eventcore │ │ └── MisericordiaEvents.java │ ├── commandcore │ │ └── Command.java │ └── settingcore │ │ └── Setting.java │ ├── mixin │ ├── mixins │ │ ├── MixinRenderManager.java │ │ ├── MixinMinecraft.java │ │ ├── MixinNetworkManager.java │ │ ├── MixinRendererLivingEntity.java │ │ ├── MixinRenderPlayer.java │ │ └── MixinRenderEnderCrystal.java │ └── MixinLoader.java │ ├── managers │ ├── friend │ │ └── FriendManager.java │ ├── setting │ │ └── SettingManager.java │ ├── shader │ │ ├── Flow.java │ │ ├── Shader.java │ │ └── FramebufferShader.java │ └── command │ │ └── CommandManager.java │ └── events │ ├── PacketEvent.java │ ├── RenderEvent.java │ └── Render2DEvent.java ├── servers.dat ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── README.md ├── LICENSE ├── .github └── workflows │ └── gradle.yml ├── gradlew.bat └── options.txt /src/main/resources/assets/misericordia/shaders/galaxy.frag: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /servers.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/servers.dat -------------------------------------------------------------------------------- /src/main/resources/assets/misericordia/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/src/main/resources/assets/misericordia/icon16.png -------------------------------------------------------------------------------- /src/main/resources/assets/misericordia/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/src/main/resources/assets/misericordia/icon32.png -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/Trajectories.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | public class Trajectories { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/texture/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/src/main/resources/assets/minecraft/textures/texture/img.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/icons/multiplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/src/main/resources/assets/minecraft/textures/icons/multiplayer.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/icons/singleplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halqq/misericordia-client/HEAD/src/main/resources/assets/minecraft/textures/icons/singleplayer.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/IRenderManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils; 2 | 3 | public interface IRenderManager { 4 | 5 | double getRenderPosX(); 6 | 7 | double getRenderPosY(); 8 | 9 | double getRenderPosZ(); 10 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx1G 4 | org.gradle.daemon=false 5 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/CrystalAuraSwitch.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura; 2 | 3 | /** 4 | * @author Halq 5 | * @since 11/06/2023 at 19:09 6 | */ 7 | 8 | public class CrystalAuraSwitch { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/CrystalAuraRotations.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura; 2 | 3 | /** 4 | * @author Halq 5 | * @since 10/06/2023 at 19:13 6 | */ 7 | 8 | public class CrystalAuraRotations { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/Minecraftable.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils; 2 | 3 | import net.minecraft.client.Minecraft; 4 | 5 | /** 6 | * @author accessmodifier364 7 | * @since 24-Nov-2021 8 | */ 9 | 10 | public interface Minecraftable { 11 | 12 | Minecraft mc = Minecraft.getMinecraft(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/Component.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components; 2 | 3 | public interface Component { 4 | 5 | void render(int mouseX, int mouseY); 6 | 7 | void mouseClicked(int mouseX, int mouseY, int mouseButton); 8 | 9 | void mouseReleased(int mouseX, int mouseY, int state); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/assets/misericordia/shaders/vertex.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | void main(void) { 4 | //Map gl_MultiTexCoord0 to index zero of gl_TexCoord 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | 7 | //Calculate position by multiplying model, view and projection matrix by the vertex vector 8 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 9 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/modoptionstab/Options.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.modoptionstab; 2 | 3 | public enum Options { 4 | 5 | OPTIONS("Options"), 6 | COLORS("Colors"), 7 | Menu("Menu"); 8 | 9 | final String name; 10 | 11 | Options(String name) { 12 | this.name = name; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/world/Scaffold.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.world; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class Scaffold extends Module { 7 | public Scaffold() { 8 | super("Scaffold", Category.WORLD); 9 | } 10 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/Jesus.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class Jesus extends Module { 7 | 8 | public Jesus() { 9 | super("Jesus", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/NoFall.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class NoFall extends Module { 7 | 8 | public NoFall() { 9 | super("NoFall", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/NoSlow.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class NoSlow extends Module { 7 | 8 | public NoSlow() { 9 | super("NoSlow", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/Timer.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class Timer extends Module { 7 | 8 | public Timer() { 9 | super("Timer", Category.EXPLOITS); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AutoXp.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | public class AutoXp extends Module { 6 | public AutoXp() { 7 | super("AutoXp", Category.MISCELLANEOUS); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/AntiWeb.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class AntiWeb extends Module { 7 | 8 | public AntiWeb() { 9 | super("AntiWeb", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/WebBreaker.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class WebBreaker extends Module { 7 | 8 | public WebBreaker() { 9 | super("WebBreaker", Category.COMBAT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/FreeCam.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | 7 | public class FreeCam extends Module { 8 | 9 | public FreeCam() { 10 | super("FreeCam", Category.EXPLOITS); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/AutoWalk.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class AutoWalk extends Module { 7 | 8 | public AutoWalk() { 9 | super("AutoWalk", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/Velocity.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class Velocity extends Module { 7 | 8 | public Velocity() { 9 | super("Velocity", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/trap/SelfTrap.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.trap; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class SelfTrap extends Module { 7 | 8 | public SelfTrap() { 9 | super("SelfTrap", Category.COMBAT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/AutoMount.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class AutoMount extends Module { 7 | 8 | public AutoMount() { 9 | super("AutoMount", Category.EXPLOITS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AutoGG.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class AutoGG extends Module { 7 | 8 | public AutoGG() { 9 | super("AutoGG", Category.MISCELLANEOUS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/MultiTask.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class MultiTask extends Module { 7 | 8 | public MultiTask() { 9 | super("MultiTask", Category.EXPLOITS); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/PingSpoof.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class PingSpoof extends Module { 7 | 8 | public PingSpoof() { 9 | super("PingSpoof", Category.EXPLOITS); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/CreativeFly.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class CreativeFly extends Module { 7 | 8 | public CreativeFly() { 9 | super("CreativeFly", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/FastSwim.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class FastSwim extends Module { 7 | 8 | public FastSwim() { 9 | super("FastSwim", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/ReverseStep.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class ReverseStep extends Module { 7 | 8 | public ReverseStep() { 9 | super("ReverseStep", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/FakeCreative.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class FakeCreative extends Module { 7 | 8 | public FakeCreative() { 9 | super("FakeCreative", Category.EXPLOITS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/ElytraFly.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class ElytraFly extends Module { 7 | 8 | public ElytraFly() { 9 | super("ElytraFly", Category.MOVEMENT); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AntiHunger.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class AntiHunger extends Module { 7 | 8 | public AntiHunger() { 9 | super("AntiHunger", Category.MISCELLANEOUS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AutoArmor.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | 7 | public class AutoArmor extends Module { 8 | 9 | public AutoArmor() { 10 | super("AutoArmor", Category.MISCELLANEOUS); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AutoClicker.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class AutoClicker extends Module { 7 | 8 | public AutoClicker() { 9 | super("AutoClicker", Category.MISCELLANEOUS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/Spammer.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | 7 | public class Spammer extends Module { 8 | 9 | public Spammer() { 10 | super("Spammer", Category.MISCELLANEOUS); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/AntiAfk.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class AntiAfk extends Module { 7 | 8 | public AntiAfk() { 9 | super("AntiAfk", Category.MISCELLANEOUS); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/FastUse.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | 7 | public class FastUse extends Module{ 8 | 9 | public FastUse() { 10 | super("FastUse", Category.MISCELLANEOUS); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/ChatSuffix.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | 6 | public class ChatSuffix extends Module { 7 | 8 | public ChatSuffix() { 9 | super("ChatSuffix", Category.MISCELLANEOUS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/PacketPearl.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class PacketPearl extends Module { 7 | 8 | public PacketPearl() { 9 | super("PacketPearl", Category.MISCELLANEOUS); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "Misericordia", 4 | "name": "Misericordia", 5 | "description": "Misericordia is better client!!", 6 | "version": "0.0.1", 7 | "mcversion": "1.12.2", 8 | "url": "", 9 | "updateUrl": "", 10 | "authorList": [ 11 | "Halq", 12 | "accessmodifier364" 13 | ], 14 | "credits": "", 15 | "logoFile": "", 16 | "screenshots": [], 17 | "dependencies": [] 18 | } 19 | ] 20 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/AutoFrameDupe.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import net.minecraft.entity.item.EntityItemFrame; 6 | 7 | public class AutoFrameDupe extends Module { 8 | 9 | public AutoFrameDupe() { 10 | super("AutoFrameDupe", Category.EXPLOITS); 11 | } 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/mixins.misericordia.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "compatibilityLevel": "JAVA_8", 4 | "mixinPriority": 2147483647, 5 | "priority": 2147483647, 6 | "package": "halq.misericordia.fun.mixin.mixins", 7 | "refmap": "mixins.misericordia.refmap.json", 8 | "mixins": [ 9 | "MixinNetworkManager", 10 | "MixinRenderPlayer", 11 | "MixinRenderEnderCrystal", 12 | "MixinRenderManager" 13 | ], 14 | "client": [ 15 | "MixinMinecraft", 16 | "MixinRendererLivingEntity" 17 | ] 18 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/chams/playerchams/PlayerChams.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.chams.playerchams; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | /** 7 | * @author Halq 8 | * @since 25/06/2023 at 18:17 9 | */ 10 | 11 | public class PlayerChams extends Module{ 12 | 13 | public PlayerChams() { 14 | super("PlayerChams", Category.RENDER); 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/NoClip.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | public class NoClip extends Module { 7 | 8 | public NoClip() { 9 | super("NoClip", Category.MOVEMENT); 10 | } 11 | 12 | @Override 13 | public void onUpdate() { 14 | mc.player.noClip = true; 15 | } 16 | 17 | @Override 18 | public void onDisable() { 19 | mc.player.noClip = false; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/client/CustomFont.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.client; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | 7 | /** 8 | * @author accessmodifier364 9 | * @since 28-Nov-2021 10 | */ 11 | 12 | public class CustomFont extends Module { 13 | 14 | public SettingBoolean shadow = create("Shadow", true); 15 | 16 | public CustomFont() { 17 | super("CustomFont", Category.OTHER); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/core/modulecore/Category.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.core.modulecore; 2 | 3 | /** 4 | * @author accessmodifier364 5 | * @since 28-Nov-2021 6 | */ 7 | public enum Category { 8 | 9 | COMBAT("Combat"), 10 | EXPLOITS("Exploits"), 11 | MISCELLANEOUS("Miscellaneous"), 12 | MOVEMENT("Movement"), 13 | RENDER("Render"), 14 | WORLD("World"), 15 | OTHER("Client"); 16 | 17 | private final String name; 18 | 19 | Category(String name) { 20 | this.name = name; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/commands/Save.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.commands; 2 | 3 | import halq.misericordia.fun.core.commandcore.Command; 4 | import halq.misericordia.fun.managers.config.ConfigManager; 5 | import halq.misericordia.fun.utils.utils.MessageUtil; 6 | 7 | /** 8 | * @author accessmodifier364 9 | * @since 25-Nov-2021 10 | */ 11 | 12 | public class Save extends Command { 13 | 14 | public Save() { 15 | super("save"); 16 | } 17 | 18 | @Override 19 | public void execute(String[] commands) { 20 | ConfigManager.INSTANCE.saveConfigs(); 21 | MessageUtil.sendMessage("Saved config."); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/Step.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.utils.Minecraftable; 6 | 7 | /** 8 | * @author Halq 9 | * @since 10/06/2023 at 03:50 10 | */ 11 | 12 | public class Step extends Module { 13 | 14 | public static Step INSTANCE; 15 | public Step() { 16 | super("Step", Category.MOVEMENT); 17 | INSTANCE = this; 18 | } 19 | 20 | @Override 21 | public void onUpdate() { 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | # Annoying Folders 26 | /.gradle/ 27 | /.idea/ 28 | /build/ 29 | /run/ 30 | /.mixin.out/ 31 | /Aurora/ 32 | /baritone/ 33 | /config/ 34 | /crash-reports/ 35 | /logs/ 36 | /mods/ 37 | /resourcepacks/ 38 | /saves/ 39 | /screenshots/ 40 | /options.txt/ 41 | /serves.dat/ 42 | /usercache.json/ 43 | /usernamecache.json/ -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinRenderManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import halq.misericordia.fun.utils.IRenderManager; 4 | import net.minecraft.client.renderer.entity.RenderManager; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(RenderManager.class) 9 | public abstract class MixinRenderManager implements IRenderManager { 10 | 11 | @Accessor 12 | @Override 13 | public abstract double getRenderPosX(); 14 | 15 | @Accessor 16 | @Override 17 | public abstract double getRenderPosY(); 18 | 19 | @Accessor 20 | @Override 21 | public abstract double getRenderPosZ(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/core/update/MainMenuBackground.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.core.update; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.URL; 6 | 7 | /** 8 | * @author Halq 9 | * @since 24/07/2023 at 19:09 10 | */ 11 | 12 | public class MainMenuBackground { 13 | 14 | static String urel = "https://pastebin.com/raw/rubRdBqR"; 15 | 16 | public static String getBackgroundUrl() throws Exception { 17 | URL url = new URL(urel); 18 | BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); 19 | String line; 20 | while ((line = reader.readLine()) != null) { 21 | return line; 22 | } 23 | return null; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/core/eventcore/MisericordiaEvents.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.core.eventcore; 2 | 3 | import net.minecraftforge.fml.common.eventhandler.Event; 4 | 5 | /** 6 | * @author Halq 7 | * @since 30/05/2023 at 12:17 8 | */ 9 | 10 | public class MisericordiaEvents extends Event { 11 | 12 | Stage stage; 13 | 14 | public MisericordiaEvents() {} 15 | 16 | public MisericordiaEvents(Stage stage) { 17 | this.stage = stage; 18 | } 19 | 20 | public Stage getStage() { 21 | return this.stage; 22 | } 23 | 24 | public void setStage(Stage stage) { 25 | this.stage = stage; 26 | this.setCanceled(false); 27 | } 28 | 29 | public enum Stage { 30 | PRE, 31 | POST 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/movement/Sprint.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.movement; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.utils.Minecraftable; 6 | 7 | /** 8 | * @author Halq 9 | * @since 10/06/2023 at 03:50 10 | */ 11 | 12 | public class Sprint extends Module { 13 | 14 | public static Sprint INSTANCE; 15 | 16 | public Sprint() { 17 | super("Sprint", Category.MOVEMENT); 18 | INSTANCE = this; 19 | } 20 | 21 | @Override 22 | public void onUpdate() { 23 | if (!Minecraftable.mc.player.isSneaking()) { 24 | Minecraftable.mc.player.setSprinting(true); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingString.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | /** 7 | * @author Halq 8 | * @since 23/06/2023 at 18:57 9 | */ 10 | 11 | public class SettingString extends Setting { 12 | 13 | private String value; 14 | 15 | public SettingString(String name, Module module, String value, boolean visible) { 16 | super(name, module, visible); 17 | this.value = value; 18 | } 19 | 20 | @Override 21 | public String getValue() { 22 | return value; 23 | } 24 | 25 | @Override 26 | public void setValue(String value) { 27 | this.value = value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingBoolean.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | /** 7 | * @author accessmodifier364 8 | * @since 24-Nov-2021 9 | */ 10 | 11 | public class SettingBoolean extends Setting { 12 | 13 | private boolean value; 14 | 15 | public SettingBoolean(String name, Module module, Boolean value, boolean visible) { 16 | super(name, module, visible); 17 | this.value = value; 18 | } 19 | 20 | @Override 21 | public Boolean getValue() { 22 | return value; 23 | } 24 | 25 | @Override 26 | public void setValue(Boolean value) { 27 | this.value = value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/commands/Help.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.commands; 2 | 3 | import halq.misericordia.fun.core.commandcore.Command; 4 | import halq.misericordia.fun.managers.command.CommandManager; 5 | import halq.misericordia.fun.utils.utils.MessageUtil; 6 | 7 | /** 8 | * @author accessmodifier364 9 | * @since 25-Nov-2021 10 | */ 11 | 12 | public class Help extends Command { 13 | 14 | public Help() { 15 | super("help"); 16 | } 17 | 18 | @Override 19 | public void execute(String[] commands) { 20 | 21 | MessageUtil.sendMessage("Available commands:"); 22 | 23 | for (Command command : CommandManager.INSTANCE.getCommands()) { 24 | MessageUtil.sendMessage(getCommandPrefix() + command.getName()); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/calcs/CrystalAuraCalcPos.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura.calcs; 2 | 3 | import net.minecraft.util.math.BlockPos; 4 | 5 | /** 6 | * @author Halq 7 | * @since 11/06/2023 at 15:32 8 | */ 9 | 10 | public class CrystalAuraCalcPos { 11 | public static class CalcPos { 12 | BlockPos blockPos; 13 | float targetDamage; 14 | 15 | public CalcPos(BlockPos blockPos, float targetDamage) { 16 | this.blockPos = blockPos; 17 | this.targetDamage = targetDamage; 18 | } 19 | 20 | public float getTargetDamage() { 21 | return targetDamage; 22 | } 23 | 24 | public BlockPos getBlockPos() { 25 | return blockPos; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/client/Console.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.client; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.gui.console.ConsoleScreen; 7 | 8 | /** 9 | * @author Halq 10 | * @since 17/06/2023 at 15:13 11 | */ 12 | 13 | public class Console extends Module { 14 | 15 | public static Console INSTANCE; 16 | public SettingBoolean blur = create("Blur", true); 17 | 18 | public Console() { 19 | super("Console", Category.OTHER); 20 | INSTANCE = this; 21 | } 22 | 23 | @Override 24 | public void onEnable() { 25 | mc.displayGuiScreen(new ConsoleScreen()); 26 | setDisabled(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/client/Script.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.client; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.gui.console.core.ConsoleAPI; 6 | import halq.misericordia.fun.gui.console.core.ConsoleScript; 7 | 8 | /** 9 | * @author Halq 10 | * @since 19/06/2023 at 20:17 11 | */ 12 | 13 | public class Script extends Module { 14 | 15 | public static Script INSTANCE; 16 | 17 | public Script() { 18 | super("Script", Category.OTHER); 19 | INSTANCE = this; 20 | } 21 | 22 | @Override 23 | public void onUpdate() { 24 | if(ConsoleScript.scriptable){ 25 | ConsoleScript.excSubexcc(ConsoleScript.bov, ConsoleScript.exv, "lol"); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/HandChams.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingDouble; 6 | 7 | /** 8 | * @author Halq 9 | * @since 04/06/2023 at 20:27 10 | */ 11 | 12 | public class HandChams extends Module { 13 | 14 | public static HandChams INSTANCE; 15 | public HandChams() { 16 | super("HandChams", Category.RENDER); 17 | INSTANCE = this; 18 | } 19 | 20 | public SettingDouble red = create("Red", 0.0, 0, 255); 21 | public SettingDouble green = create("Green", 153.0, 0, 255); 22 | public SettingDouble blue = create("Blue", 255.0, 0, 255); 23 | public SettingDouble alpha = create("Alpha", 170.0, 0, 255); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/guibars/ClickBar.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.guibars; 2 | 3 | import halq.misericordia.fun.executor.modules.client.Console; 4 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 5 | 6 | /** 7 | * @author Halq 8 | * @since 19/06/2023 at 17:38 9 | */ 10 | 11 | public class ClickBar { 12 | 13 | public static void mouseClicked(int mouseX, int mouseY, int mouseButton){ 14 | if(mouseX >= 290 && mouseX <= 310 && mouseY >= 0 && mouseY <= 10 && mouseButton == 0){ 15 | Console.INSTANCE.setDisabled(); 16 | InteligentGui.INSTANCE.setEnabled(); 17 | } 18 | 19 | if(mouseX >= 310 && mouseX <= 345 && mouseY >= 0 && mouseY <= 10 && mouseButton == 0){ 20 | InteligentGui.INSTANCE.setDisabled(); 21 | Console.INSTANCE.setEnabled(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/anvilaura/AnvilAura.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.anvilaura; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingDouble; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | import net.minecraft.init.Blocks; 10 | import net.minecraft.util.math.BlockPos; 11 | import net.minecraft.util.math.Vec3d; 12 | 13 | import javax.swing.text.html.parser.Entity; 14 | 15 | public class AnvilAura extends Module { 16 | 17 | public AnvilAura() { 18 | super("AnvilAura", Category.COMBAT); 19 | } 20 | 21 | @Override 22 | public void onUpdate() { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/NoRender.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.utils.Minecraftable; 6 | import net.minecraftforge.client.event.RenderWorldLastEvent; 7 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 8 | 9 | /** 10 | * @author Halq 11 | * @since 10/06/2023 at 15:55 12 | */ 13 | 14 | public class NoRender extends Module { 15 | 16 | public static NoRender INSTANCE; 17 | 18 | public NoRender() { 19 | super("NoRender", Category.RENDER); 20 | INSTANCE = this; 21 | } 22 | 23 | @SubscribeEvent 24 | public void onRenderWorldLast(RenderWorldLastEvent event) { 25 | Minecraftable.mc.effectRenderer.clearEffects(Minecraftable.mc.world); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/friend/FriendManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.friend; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * @author accessmodifier364 8 | * @since 24-Nov-2021 9 | */ 10 | 11 | public class FriendManager { 12 | 13 | public static List friends = new ArrayList<>(); 14 | 15 | public static boolean isFriend(String name) { 16 | return friends.stream().anyMatch(friend -> friend.username.equalsIgnoreCase(name)); 17 | } 18 | 19 | public static Friend getFriendObject(String name) { 20 | return new Friend(name); 21 | } 22 | 23 | public static class Friend { 24 | String username; 25 | 26 | public Friend(String username) { 27 | this.username = username; 28 | } 29 | 30 | public String getUsername() { 31 | return this.username; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/utils/IconsUtil.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils.utils; 2 | 3 | import javax.imageio.ImageIO; 4 | import java.awt.image.BufferedImage; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.ByteBuffer; 8 | import java.util.Arrays; 9 | 10 | public class IconsUtil { 11 | 12 | public static final IconsUtil INSTANCE = new IconsUtil(); 13 | 14 | public ByteBuffer readImageToBuffer(InputStream inputStream) throws IOException { 15 | BufferedImage bufferedimage = ImageIO.read(inputStream); 16 | int[] aint = bufferedimage.getRGB(0, 0, bufferedimage.getWidth(), bufferedimage.getHeight(), null, 0, bufferedimage.getWidth()); 17 | ByteBuffer bytebuffer = ByteBuffer.allocate(4 * aint.length); 18 | Arrays.stream(aint).map(i -> i << 8 | (i >> 24 & 255)).forEach(bytebuffer::putInt); 19 | bytebuffer.flip(); 20 | return bytebuffer; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/modoptionstab/options/ColorOptions.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.modoptionstab.options; 2 | 3 | public enum ColorOptions { 4 | COLORSYNC("ColorSync", false), 5 | RAINBOW("Rainbow", false), 6 | RAINBOWSPEED("RainbowSpeed", "0", false), 7 | 8 | RED("Red", "0", false), 9 | GREEN("Green", "0", false), 10 | BLUE("Blue", "0", false), 11 | ALPHA("Alpha", "0", false); 12 | 13 | public final String name; 14 | public boolean bool = false; 15 | public String value = "1"; 16 | public boolean typing = false; 17 | 18 | ColorOptions(String name) { 19 | this.name = name; 20 | } 21 | 22 | ColorOptions(String name, String value, boolean typing) { 23 | this.name = name; 24 | this.value = value; 25 | } 26 | 27 | ColorOptions(String name, boolean bool) { 28 | this.name = name; 29 | this.bool = bool; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/setting/SettingManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.setting; 2 | 3 | import halq.misericordia.fun.core.settingcore.Setting; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | import java.util.stream.Collectors; 9 | 10 | /** 11 | * @author accessmodifier364 12 | * @since 24-Nov-2021 13 | */ 14 | 15 | @SuppressWarnings("rawtypes") 16 | public class SettingManager { 17 | 18 | public static SettingManager INSTANCE; 19 | private final List settings; 20 | 21 | public SettingManager() { 22 | settings = new ArrayList<>(); 23 | } 24 | 25 | public List getSettings() { 26 | return settings; 27 | } 28 | 29 | public List getSettingsInModule(Module module) { 30 | return settings.stream().filter(setting -> setting.getModule().equals(module)).collect(Collectors.toList()); 31 | } 32 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Misericordia 2 | ![image](https://github.com/Halqq/misericordia-client/assets/72313113/67a33855-46da-48c6-a495-a1027a97b7d2) 3 | 4 | 5 | Misericordia!!!!!!! 6 | 7 | this is a hacked mod for Forge 1.12.2, it's in the early stages of development, and 8 | there are no public builds yet. I'm trying to focus more on the visuals and client GUIs to make it as enjoyable as possible. 9 | 10 | note: i took the base of aurora (an old client made by me) and made some modifications 11 | 12 | this have website but is in development: https://halqq.github.io/misericordiasite/ 13 | 14 | # Contributions 15 | Rina - help me with lerp 16 | Visivel - logo and help me with ideas for modules 17 | AcessModifier - help me with some things in the client base 18 | 19 | # Screenshots 20 | ![image](https://github.com/Halqq/misericordia-client/assets/72313113/a4a33b9b-aadf-4d29-b327-9042a6076510) ![image](https://github.com/Halqq/misericordia-client/assets/72313113/45a00e50-8f1e-4d79-8e77-ba1e2987434b) 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingCategory.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Halq 10 | * @since 16/06/2023 at 17:25 11 | */ 12 | 13 | public class SettingCategory extends Setting { 14 | 15 | private final List modes; 16 | private String value; 17 | 18 | public SettingCategory(String name, Module module, String value, List modes, int isCategory) { 19 | super(name, module, true); 20 | this.value = value; 21 | this.modes = modes; 22 | } 23 | 24 | @Override 25 | public String getValue() { 26 | return value; 27 | } 28 | 29 | @Override 30 | public void setValue(String value) { 31 | this.value = value; 32 | } 33 | 34 | public List getModes() { 35 | return modes; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/events/PacketEvent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.events; 2 | 3 | import halq.misericordia.fun.core.eventcore.MisericordiaEvents; 4 | import net.minecraft.network.Packet; 5 | import net.minecraftforge.fml.common.eventhandler.Cancelable; 6 | 7 | 8 | @Cancelable 9 | public class PacketEvent extends MisericordiaEvents { 10 | 11 | Packet packet; 12 | 13 | public PacketEvent(Packet packet, Stage stage) { 14 | super(stage); 15 | this.packet = packet; 16 | } 17 | 18 | public Packet getPacket() { 19 | return this.packet; 20 | } 21 | 22 | public static class PacketSendEvent extends PacketEvent { 23 | public PacketSendEvent(Packet packet, Stage stage) { 24 | super(packet, stage); 25 | } 26 | } 27 | 28 | public static class PacketReceiveEvent extends PacketEvent { 29 | public PacketReceiveEvent(Packet packet, Stage stage) { 30 | super(packet, stage); 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingScreen.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | import net.minecraft.client.gui.GuiScreen; 6 | 7 | /** 8 | * @author Halq 9 | * @since 23/06/2023 at 18:53 10 | */ 11 | 12 | public class SettingScreen extends Setting { 13 | 14 | private boolean value; 15 | private final GuiScreen screen; 16 | 17 | public SettingScreen(String name, Module module, Boolean value, GuiScreen screen, boolean visible) { 18 | super(name, module, visible); 19 | this.value = value; 20 | this.screen = screen; 21 | } 22 | 23 | @Override 24 | public Boolean getValue() { 25 | return value; 26 | } 27 | 28 | @Override 29 | public void setValue(Boolean value) { 30 | this.value = value; 31 | } 32 | 33 | public GuiScreen getScreen() { 34 | return screen; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/core/commandcore/Command.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.core.commandcore; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import halq.misericordia.fun.managers.command.CommandManager; 5 | 6 | /** 7 | * @author accessmodifier364 8 | * @since 24-Nov-2021 9 | */ 10 | 11 | abstract public class Command implements Minecraftable { 12 | 13 | private final String name; 14 | private final String[] commands; 15 | 16 | public Command(String name) { 17 | this.name = name; 18 | commands = new String[]{""}; 19 | } 20 | 21 | public Command(String name, String[] commands) { 22 | this.name = name; 23 | this.commands = commands; 24 | } 25 | 26 | public static String getCommandPrefix() { 27 | return CommandManager.INSTANCE.getPrefix(); 28 | } 29 | 30 | public abstract void execute(String[] var1); 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public String[] getCommands() { 37 | return commands; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/events/RenderEvent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.events; 2 | 3 | 4 | import net.minecraft.client.renderer.BufferBuilder; 5 | import net.minecraft.client.renderer.Tessellator; 6 | import net.minecraft.util.math.Vec3d; 7 | 8 | public class RenderEvent { 9 | private final Tessellator tessellator; 10 | private final Vec3d renderPos; 11 | private final float partialTicks; 12 | 13 | public RenderEvent(Tessellator tessellator, Vec3d renderPos, float ticks) { 14 | this.tessellator = tessellator; 15 | this.renderPos = renderPos; 16 | partialTicks = ticks; 17 | } 18 | 19 | public BufferBuilder getBuffer() { 20 | return tessellator.getBuffer(); 21 | } 22 | 23 | public void setTranslation(Vec3d translation) { 24 | getBuffer().setTranslation(-translation.x, -translation.y, -translation.z); 25 | } 26 | 27 | public void resetTranslation() { 28 | setTranslation(renderPos); 29 | } 30 | 31 | public float getPartialTicks() { 32 | return partialTicks; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/shader/Flow.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.shader; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.client.gui.ScaledResolution; 5 | import org.lwjgl.opengl.GL20; 6 | 7 | public class Flow extends FramebufferShader { 8 | public static Flow Flow_Shader; 9 | public float time; 10 | public float timef = 0.05f; 11 | 12 | public Flow() { 13 | super("flow.frag"); 14 | } 15 | 16 | @Override 17 | public void setupUniforms() { 18 | this.setupUniform("resolution"); 19 | this.setupUniform("time"); 20 | } 21 | 22 | @Override 23 | public void updateUniforms() { 24 | GL20.glUniform2f(this.getUniform("resolution"), (float)new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth(), (float)new ScaledResolution(Minecraft.getMinecraft()).getScaledHeight()); 25 | GL20.glUniform1f(this.getUniform("time"), this.time); 26 | time += timef * animationSpeed; 27 | } 28 | 29 | static { 30 | Flow.Flow_Shader = new Flow(); 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/core/settingcore/Setting.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.core.settingcore; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | 5 | /** 6 | * @author accessmodifier364 7 | * @since 24-Nov-2021 8 | */ 9 | 10 | abstract public class Setting { 11 | 12 | private final String name; 13 | private final Module module; 14 | private boolean visible; // I don't know why people uses generic Predicates for this. 15 | 16 | public Setting(String name, Module module, boolean visible) { 17 | this.name = name; 18 | this.module = module; 19 | this.visible = visible; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public Module getModule() { 27 | return module; 28 | } 29 | 30 | public boolean getVisible() { 31 | return visible; 32 | } 33 | 34 | public void setVisible(boolean visible) { 35 | this.visible = visible; 36 | } 37 | 38 | abstract public T getValue(); 39 | 40 | abstract public void setValue(T value); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/trap/TrapPositions.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.trap; 2 | 3 | import net.minecraft.util.math.BlockPos; 4 | 5 | public class TrapPositions { 6 | 7 | public static final BlockPos[] Full = { 8 | new BlockPos(0, 2, 0), 9 | new BlockPos(1, 1, 0), 10 | new BlockPos(-1, 1, 0), 11 | new BlockPos(0, 1, 1), 12 | new BlockPos(0, 1, -1), 13 | new BlockPos(1, 0, 0), 14 | new BlockPos(-1, 0, 0), 15 | new BlockPos(0, 0, 1), 16 | new BlockPos(0, 0, -1), 17 | }; 18 | 19 | public static final BlockPos[] Face = { 20 | new BlockPos(1, 0, 0), 21 | new BlockPos(-1, 0, 0), 22 | new BlockPos(0, 0, 1), 23 | new BlockPos(0, 0, -1), 24 | }; 25 | 26 | public static final BlockPos[] Surround = { 27 | new BlockPos(1, -1, 0), 28 | new BlockPos(-1, -1, 0), 29 | new BlockPos(0, -1, 1), 30 | new BlockPos(0, -1, -1), 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Hallqq 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2.3.4 14 | - name: Set up JDK 8 15 | uses: actions/setup-java@v2.3.0 16 | with: 17 | distribution: 'temurin' 18 | java-version: '8' 19 | - name: Grant execute permission for gradlew 20 | run: chmod +x gradlew 21 | - name: Gradle cache 22 | uses: actions/cache@v2.1.6 23 | with: 24 | path: | 25 | ~/.gradle/caches 26 | ~/.gradle/wrapper 27 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} 28 | restore-keys: | 29 | ${{ runner.os }}-gradle- 30 | - name: Build Client 31 | run: | 32 | ./gradlew --build-cache build 33 | - name: List files 34 | run: ls 35 | - name: Upload a Build Artifact 36 | uses: actions/upload-artifact@v2.2.4 37 | with: 38 | name: Client 39 | path: ./build/libs/ -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/events/Render2DEvent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.events; 2 | 3 | import halq.misericordia.fun.core.eventcore.MisericordiaEvents; 4 | import net.minecraft.client.gui.ScaledResolution; 5 | 6 | public class Render2DEvent extends MisericordiaEvents { 7 | public float partialTicks; 8 | public ScaledResolution scaledResolution; 9 | 10 | public Render2DEvent(float partialTicks, ScaledResolution scaledResolution) { 11 | this.partialTicks = partialTicks; 12 | this.scaledResolution = scaledResolution; 13 | } 14 | 15 | public void setPartialTicks(float partialTicks) { 16 | this.partialTicks = partialTicks; 17 | } 18 | 19 | public void setScaledResolution(ScaledResolution scaledResolution) { 20 | this.scaledResolution = scaledResolution; 21 | } 22 | 23 | public double getScreenWidth() { 24 | return this.scaledResolution.getScaledWidth_double(); 25 | } 26 | 27 | public double getScreenHeight() { 28 | return this.scaledResolution.getScaledHeight_double(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/commands/Toggle.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import halq.misericordia.fun.core.commandcore.Command; 5 | import halq.misericordia.fun.core.modulecore.Module; 6 | import halq.misericordia.fun.managers.module.ModuleManager; 7 | import halq.misericordia.fun.utils.utils.MessageUtil; 8 | 9 | /** 10 | * @author accessmodifier364 11 | * @since 25-Nov-2021 12 | */ 13 | 14 | public class Toggle extends Command { 15 | 16 | public Toggle() { 17 | super("toggle", new String[]{"[module]"}); 18 | } 19 | 20 | @Override 21 | public void execute(String[] commands) { 22 | 23 | if (commands.length == 1) { 24 | MessageUtil.sendMessage(getCommandPrefix() + "toggle " + ChatFormatting.AQUA + "[module]"); 25 | return; 26 | } 27 | 28 | Module module = ModuleManager.INSTANCE.getModule(commands[0]); 29 | 30 | if (module == null) { 31 | MessageUtil.sendMessage("That module does not exist."); 32 | return; 33 | } 34 | module.toggle(); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingDouble.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | /** 7 | * @author accessmodifier364 8 | * @since 24-Nov-2021 9 | */ 10 | 11 | public class SettingDouble extends Setting { 12 | 13 | private final double minValue; 14 | private final double maxValue; 15 | private double value; 16 | 17 | public SettingDouble(String name, Module module, Double value, double minValue, double maxValue, boolean visible) { 18 | super(name, module, visible); 19 | this.value = value; 20 | this.minValue = minValue; 21 | this.maxValue = maxValue; 22 | } 23 | 24 | 25 | @Override 26 | public Double getValue() { 27 | return value; 28 | } 29 | 30 | @Override 31 | public void setValue(Double value) { 32 | this.value = value; 33 | } 34 | 35 | public double getMinValue() { 36 | return minValue; 37 | } 38 | 39 | public double getMaxValue() { 40 | return maxValue; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/console/core/ConsoleAPI.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.console.core; 2 | 3 | import halq.misericordia.fun.gui.console.DrawConsole; 4 | import halq.misericordia.fun.utils.Minecraftable; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * @author Halq 11 | * @since 18/06/2023 at 19:28 12 | */ 13 | 14 | public class ConsoleAPI { 15 | 16 | public static List suggestions = new ArrayList<>(); 17 | public static int suggestionIndex; 18 | public static boolean chatlog = false; 19 | static boolean prefix = true; 20 | static String prefixString = " | "; 21 | 22 | public static void log(String message) { 23 | String[] lines = message.split("\n"); 24 | int maxWidth = (int) (390 * 2); 25 | for (String line : lines) { 26 | List wrappedLines = Minecraftable.mc.fontRenderer.listFormattedStringToWidth(line, maxWidth); 27 | DrawConsole.logs.addAll(wrappedLines); 28 | } 29 | 30 | while (DrawConsole.logs.size() > DrawConsole.maxLogs) { 31 | DrawConsole.logs.remove(0); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/surround/SurroundPos.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.surround; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * @author Halq 11 | * @since 07/06/2023 at 03:20 12 | */ 13 | 14 | public class SurroundPos implements Minecraftable { 15 | 16 | public static List getSurroundPositions() { 17 | List positions = new ArrayList<>(); 18 | 19 | BlockPos playerPos = new BlockPos(mc.player.posX, mc.player.posY, mc.player.posZ); 20 | 21 | positions.add(playerPos.add(0, -1, 0)); 22 | positions.add(playerPos.add(1, -1, 0)); 23 | positions.add(playerPos.add(0, -1, 1)); 24 | positions.add(playerPos.add(-1, -1, 0)); 25 | positions.add(playerPos.add(0, -1, -1)); 26 | 27 | positions.add(playerPos.add(1, 0, 0)); 28 | positions.add(playerPos.add(0, 0, 1)); 29 | positions.add(playerPos.add(-1, 0, 0)); 30 | positions.add(playerPos.add(0, 0, -1)); 31 | 32 | return positions; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingInteger.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | /** 7 | * @author accessmodifier364 8 | * @since 24-Nov-2021 9 | */ 10 | 11 | // SettingInteger hoter = create("cum", 50, 1, 4); 12 | 13 | public class SettingInteger extends Setting { 14 | 15 | private final int minValue; 16 | private final int maxValue; 17 | private int value; 18 | 19 | public SettingInteger(String name, Module module, Integer value, int minValue, int maxValue, boolean visible) { 20 | super(name, module, visible); 21 | this.value = value; 22 | this.minValue = minValue; 23 | this.maxValue = maxValue; 24 | } 25 | 26 | @Override 27 | public Integer getValue() { 28 | return value; 29 | } 30 | 31 | @Override 32 | public void setValue(Integer value) { 33 | this.value = value; 34 | } 35 | 36 | public int getMinValue() { 37 | return minValue; 38 | } 39 | 40 | public int getMaxValue() { 41 | return maxValue; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingMode.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author accessmodifier364 10 | * @apiNote This class extends same as SettingString but when you will code the gui 11 | * or something, ask using setting instanceof SettingMode and cast the setting to 12 | * this class for getting the getModes() method. 13 | * @since 24-Nov-2021 14 | */ 15 | 16 | public class SettingMode extends Setting { 17 | 18 | private final List modes; 19 | private String value; 20 | 21 | public SettingMode(String name, Module module, String value, List modes, boolean visible) { 22 | super(name, module, visible); 23 | this.value = value; 24 | this.modes = modes; 25 | } 26 | 27 | @Override 28 | public String getValue() { 29 | return value; 30 | } 31 | 32 | @Override 33 | public void setValue(String value) { 34 | this.value = value; 35 | } 36 | 37 | public List getModes() { 38 | return modes; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/console/core/TabComplete.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.console.core; 2 | 3 | import halq.misericordia.fun.gui.console.DrawConsole; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * @author Halq 10 | * @since 18/06/2023 at 19:27 11 | */ 12 | 13 | public class TabComplete { 14 | 15 | public static int index = 0; 16 | 17 | public static void tabComplete(String input) { 18 | List commands = CommandExc.getCommands(); 19 | List suggestions = new ArrayList<>(); 20 | 21 | for (String command : commands) { 22 | if (command.startsWith(input)) { 23 | suggestions.add(command); 24 | } 25 | } 26 | 27 | if (suggestions.size() == 1) { 28 | DrawConsole.inputString = suggestions.get(0); 29 | } else if (suggestions.size() > 1) { 30 | int currentIndex = suggestions.indexOf(DrawConsole.inputString); 31 | if (currentIndex == -1 || currentIndex == suggestions.size() - 1) { 32 | DrawConsole.inputString = suggestions.get(0); 33 | } else { 34 | DrawConsole.inputString = suggestions.get(currentIndex + 1); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/CrystalAuraPredict.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura; 2 | 3 | import halq.misericordia.fun.executor.modules.combat.crystalaura.calcs.CrystalAuraCalcPos; 4 | import halq.misericordia.fun.executor.modules.combat.crystalaura.module.CrystalAuraModule; 5 | import halq.misericordia.fun.utils.Minecraftable; 6 | import net.minecraft.network.play.client.CPacketPlayerDigging; 7 | import net.minecraft.util.EnumFacing; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.util.math.Vec3d; 10 | 11 | /** 12 | * @author Halq 13 | * @since 11/06/2023 at 19:30 14 | */ 15 | 16 | public class CrystalAuraPredict implements Minecraftable { 17 | 18 | public static Vec3d predictCrystalPosition(CrystalAuraCalcPos.CalcPos calcPos) { 19 | if (calcPos != null && calcPos.getBlockPos() != null) { 20 | BlockPos crystalPos = calcPos.getBlockPos(); 21 | double posX = crystalPos.getX() + 0.5; 22 | double posY = crystalPos.getY() + 1.0; 23 | double posZ = crystalPos.getZ() + 0.5; 24 | return new Vec3d(posX, posY, posZ); 25 | } 26 | return null; 27 | } 28 | 29 | public static void caAttackPredict() { 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/FullBright.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingMode; 6 | import net.minecraft.init.MobEffects; 7 | import net.minecraft.potion.PotionEffect; 8 | 9 | import java.util.Arrays; 10 | 11 | /** 12 | * @author halq 13 | * @since 30-11-2021 14 | */ 15 | 16 | public class FullBright extends Module { 17 | 18 | SettingMode mode = create("Mode", "Setting", Arrays.asList("Setting", "Potion")); 19 | private float save; 20 | 21 | public FullBright() { 22 | super("FullBright", Category.RENDER); 23 | } 24 | 25 | @Override 26 | public void onEnable() { 27 | save = mc.gameSettings.gammaSetting; 28 | } 29 | 30 | @Override 31 | public void onUpdate() { 32 | if (mode.getValue().equalsIgnoreCase("Setting")) { 33 | mc.gameSettings.gammaSetting = 1000; 34 | } else if (mode.getValue().equalsIgnoreCase("Potion")) { 35 | mc.player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION)); 36 | } 37 | } 38 | 39 | @Override 40 | public void onDisable() { 41 | mc.gameSettings.gammaSetting = save; 42 | mc.player.removePotionEffect(MobEffects.NIGHT_VISION); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/MixinLoader.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin; 2 | 3 | import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; 4 | import org.spongepowered.asm.launch.MixinBootstrap; 5 | import org.spongepowered.asm.mixin.MixinEnvironment; 6 | import org.spongepowered.asm.mixin.Mixins; 7 | 8 | import javax.annotation.Nullable; 9 | import java.util.Map; 10 | 11 | /** 12 | * @author Halq 13 | * @since 21/03/2023 at 23:42 14 | */ 15 | 16 | @IFMLLoadingPlugin.MCVersion(value = "1.12.2") 17 | public class MixinLoader implements IFMLLoadingPlugin { 18 | 19 | public MixinLoader() { 20 | MixinBootstrap.init(); 21 | Mixins.addConfigurations("mixins.misericordia.json", "mixins.baritone.json"); 22 | MixinEnvironment.getDefaultEnvironment().setObfuscationContext("searge"); 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 | @Nullable 37 | @Override 38 | public String getSetupClass() { 39 | return null; 40 | } 41 | 42 | @Override 43 | public void injectData(Map map) {} 44 | 45 | @Override 46 | public String getAccessTransformerClass() { 47 | return null; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/settings/SettingColor.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.settings; 2 | 3 | import halq.misericordia.fun.core.modulecore.Module; 4 | import halq.misericordia.fun.core.settingcore.Setting; 5 | 6 | import java.awt.*; 7 | 8 | /** 9 | * @author Halq 10 | * @since 23/06/2023 at 21:44 11 | */ 12 | 13 | public class SettingColor extends Setting { 14 | 15 | private Color value; 16 | 17 | public SettingColor(String name, Module module, Color value, boolean visible) { 18 | super(name, module, visible); 19 | this.value = value; 20 | } 21 | 22 | @Override 23 | public Color getValue() { 24 | return value; 25 | } 26 | 27 | @Override 28 | public void setValue(Color value) { 29 | this.value = value; 30 | } 31 | 32 | public void setAlpha(int alpha) { 33 | this.value = new Color(this.value.getRed(), this.value.getGreen(), this.value.getBlue(), alpha); 34 | } 35 | 36 | public void setRed(int red) { 37 | this.value = new Color(red, this.value.getGreen(), this.value.getBlue(), this.value.getAlpha()); 38 | } 39 | 40 | public void setGreen(int green) { 41 | this.value = new Color(this.value.getRed(), green, this.value.getBlue(), this.value.getAlpha()); 42 | } 43 | 44 | public void setBlue(int blue) { 45 | this.value = new Color(this.value.getRed(), this.value.getGreen(), blue, this.value.getAlpha()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/utils/ColorUtil.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils.utils; 2 | 3 | import java.awt.*; 4 | 5 | /** 6 | * @author accessmodifier364 7 | * @since 25-Nov-2021 8 | */ 9 | 10 | public class ColorUtil { 11 | public static int getRainbow(int speed, int offset, float s, float b) { 12 | float hue = (System.currentTimeMillis() + (long) offset) % (long) speed; 13 | return Color.getHSBColor(hue / (float) speed, s, b).getRGB(); 14 | } 15 | 16 | public static int toRGBA(double r, double g, double b, double a) { 17 | return ColorUtil.toRGBA((float) r, (float) g, (float) b, (float) a); 18 | } 19 | 20 | public static int toRGBA(int r, int g, int b) { 21 | return ColorUtil.toRGBA(r, g, b, 255); 22 | } 23 | 24 | public static int toRGBA(int r, int g, int b, int a) { 25 | return (r << 16) + (g << 8) + b + (a << 24); 26 | } 27 | 28 | public static int toARGB(int r, int g, int b, int a) { 29 | return new Color(r, g, b, a).getRGB(); 30 | } 31 | 32 | public static int toRGBA(float r, float g, float b, float a) { 33 | return ColorUtil.toRGBA((int) (r * 255.0f), (int) (g * 255.0f), (int) (b * 255.0f), (int) (a * 255.0f)); 34 | } 35 | 36 | public static int toRGBA(float[] colors) { 37 | if (colors.length != 4) { 38 | throw new IllegalArgumentException("colors[] must have a length of 4!"); 39 | } 40 | return ColorUtil.toRGBA(colors[0], colors[1], colors[2], colors[3]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/holefiller/module/HoleFillerModule.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.holefiller.module; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingDouble; 7 | import halq.misericordia.fun.executor.utils.HoleUtils; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock; 10 | import net.minecraft.util.EnumFacing; 11 | import net.minecraft.util.EnumHand; 12 | import net.minecraft.util.math.BlockPos; 13 | 14 | public class HoleFillerModule extends Module { 15 | 16 | public HoleFillerModule() { 17 | super("HoleFiller", Category.COMBAT); 18 | } 19 | 20 | 21 | SettingDouble range = create("Range", 4.5, 0, 6); 22 | SettingBoolean rotate = create("Rotate", true); 23 | SettingBoolean autoSwitch = create("AutoSwitch", true); 24 | EntityPlayer target; 25 | BlockPos pos; 26 | 27 | @Override 28 | public void onUpdate() { 29 | for(BlockPos holes : HoleUtils.getHoles(range.getValue().floatValue())){ 30 | if(mc.player.getDistance(holes.getX(), holes.getY(), holes.getZ()) <= range.getValue()){ 31 | mc.player.connection.sendPacket(new CPacketPlayerTryUseItemOnBlock(holes, EnumFacing.UP, EnumHand.MAIN_HAND, 0, 0, 0)); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/surround/SurroundRender.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.surround; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import halq.misericordia.fun.utils.utils.RenderUtil; 5 | import net.minecraft.util.math.AxisAlignedBB; 6 | import net.minecraft.util.math.BlockPos; 7 | 8 | import java.awt.*; 9 | 10 | /** 11 | * @author Halq 12 | * @since 10/06/2023 at 03:21 13 | */ 14 | 15 | public class SurroundRender implements Minecraftable { 16 | 17 | public static void renderSurround(boolean isPlaceable, BlockPos pos, float r, float g, float b, float a) { 18 | final AxisAlignedBB bb = new AxisAlignedBB(pos.getX() - mc.getRenderManager().viewerPosX, pos.getY() - mc.getRenderManager().viewerPosY, pos.getZ() - mc.getRenderManager().viewerPosZ, pos.getX() + 1 - mc.getRenderManager().viewerPosX, pos.getY() + (1) - mc.getRenderManager().viewerPosY, pos.getZ() + 1 - mc.getRenderManager().viewerPosZ); 19 | if (RenderUtil.isInViewFrustrum(new AxisAlignedBB(bb.minX + mc.getRenderManager().viewerPosX, bb.minY + mc.getRenderManager().viewerPosY, bb.minZ + mc.getRenderManager().viewerPosZ, bb.maxX + mc.getRenderManager().viewerPosX, bb.maxY + mc.getRenderManager().viewerPosY, bb.maxZ + mc.getRenderManager().viewerPosZ))) { 20 | if (isPlaceable) { 21 | Color color = new Color(r, g, b, a); 22 | Color color2 = new Color(r, g, b, a / 5.5F); 23 | 24 | RenderUtil.drawGradientFilledBox(bb, color, color2); 25 | RenderUtil.drawGradientBlockOutline(bb, color, color, 1.7f); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/fallpredict/module/FallPredictModule.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.fallpredict.module; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.events.RenderEvent; 6 | import halq.misericordia.fun.executor.modules.render.fallpredict.FallPredictCalcs; 7 | import halq.misericordia.fun.utils.utils.RenderUtil; 8 | import net.minecraft.util.math.AxisAlignedBB; 9 | import net.minecraft.util.math.BlockPos; 10 | 11 | public class FallPredictModule extends Module { 12 | 13 | public FallPredictModule() { 14 | super("FallPredict", Category.RENDER); 15 | } 16 | 17 | @Override 18 | public void onRender3D(RenderEvent event){ 19 | BlockPos fallPos = FallPredictCalcs.calcPos(); 20 | 21 | if(fallPos != null) { 22 | final AxisAlignedBB bb = new AxisAlignedBB(fallPos.x - mc.getRenderManager().viewerPosX, fallPos.y - mc.getRenderManager().viewerPosY, fallPos.z - mc.getRenderManager().viewerPosZ, fallPos.x + 1 - mc.getRenderManager().viewerPosX, fallPos.y + (1) - mc.getRenderManager().viewerPosY, fallPos.z + 1 - mc.getRenderManager().viewerPosZ); 23 | 24 | if (RenderUtil.isInViewFrustrum(new AxisAlignedBB(bb.minX + mc.getRenderManager().viewerPosX, bb.minY + mc.getRenderManager().viewerPosY, bb.minZ + mc.getRenderManager().viewerPosZ, bb.maxX + mc.getRenderManager().viewerPosX, bb.maxY + mc.getRenderManager().viewerPosY, bb.maxZ + mc.getRenderManager().viewerPosZ))) { 25 | RenderUtil.drawESP(bb, 0, 255, 0, 255); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/client/Colors.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.client; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingInteger; 7 | import halq.misericordia.fun.utils.utils.ColorUtil; 8 | 9 | import java.awt.*; 10 | 11 | /** 12 | * @author accessmodifier364 13 | * @since 25-Nov-2021 14 | */ 15 | 16 | public class Colors extends Module { 17 | 18 | public SettingInteger red = create("Red", 127, 0, 255); 19 | public SettingInteger green = create("Green", 0, 0, 255); 20 | public SettingInteger blue = create("Blue", 127, 0, 255); 21 | public SettingInteger alpha = create("Alpha", 128, 0, 255); 22 | SettingBoolean rainbow = create("Rainbow", true); 23 | SettingInteger saturation = create("Saturation", 60, 1, 100); 24 | SettingInteger brightness = create("Brightness", 100, 1, 100); 25 | SettingInteger speed = create("Speed", 40, 1, 100); 26 | 27 | public Colors() { 28 | super("Colors", Category.OTHER); 29 | } 30 | 31 | @Override 32 | public void onUpdate() { 33 | if (rainbow.getValue()) { 34 | Color color = new Color(ColorUtil.getRainbow(speed.getValue() * 100, 0, (float) saturation.getValue() / 100.0f, (float) brightness.getValue() / 100.0f)); 35 | red.setValue(color.getRed()); 36 | green.setValue(color.getGreen()); 37 | blue.setValue(color.getBlue()); 38 | } 39 | } 40 | 41 | public Color getColor() { 42 | return new Color(red.getValue(), green.getValue(), blue.getValue(), alpha.getValue()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/killaura/CheaseAI.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.killaura; 2 | 3 | import baritone.api.BaritoneAPI; 4 | import baritone.api.IBaritone; 5 | import halq.misericordia.fun.utils.Minecraftable; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | 10 | import java.util.function.Predicate; 11 | 12 | /** 13 | * @author Halq 14 | * @since 04/06/2023 at 19:59 15 | */ 16 | 17 | public class CheaseAI implements Minecraftable { 18 | 19 | static IBaritone baritone = BaritoneAPI.getProvider().getBaritoneForPlayer(Minecraft.getMinecraft().player); 20 | 21 | public static void chease(EntityPlayer player) { 22 | if (baritone != null) { 23 | Predicate followPredicate = (entity) -> entity == player; 24 | baritone.getFollowProcess().follow(followPredicate); 25 | BaritoneAPI.getSettings().allowSprint.value = true; 26 | if (targetIsFast(player) && !mc.player.isSprinting()) { 27 | mc.player.setSprinting(true); 28 | } 29 | } 30 | } 31 | 32 | public static void stopChease() { 33 | if (baritone != null) { 34 | baritone.getFollowProcess().cancel(); 35 | } 36 | } 37 | 38 | public static boolean targetIsFast(EntityPlayer player) { 39 | EntityPlayer currentUser = mc.player; 40 | 41 | if (currentUser == null) { 42 | return false; 43 | } 44 | 45 | double currentPlayerSpeed = Math.sqrt(player.motionX * player.motionX + player.motionZ * player.motionZ); 46 | double currentUserSpeed = Math.sqrt(currentUser.motionX * currentUser.motionX + currentUser.motionZ * currentUser.motionZ); 47 | 48 | return currentPlayerSpeed > currentUserSpeed; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinMinecraft.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import halq.misericordia.fun.gui.main.GuiMainMenuScreen; 4 | import halq.misericordia.fun.managers.config.ConfigManager; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.gui.GuiListWorldSelection; 7 | import net.minecraft.client.gui.GuiMainMenu; 8 | import net.minecraft.client.gui.GuiScreen; 9 | import net.minecraft.client.gui.GuiWorldSelection; 10 | import net.minecraft.crash.CrashReport; 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 | /** 17 | * @author accessmodifier364 18 | * @since 24-Nov-2021 19 | */ 20 | 21 | @Mixin(value = {Minecraft.class}) 22 | public class MixinMinecraft { 23 | 24 | @Inject(method = "crashed", at = @At("HEAD")) 25 | public void crashed(CrashReport crash, CallbackInfo callbackInfo) { 26 | ConfigManager.INSTANCE.saveConfigs(); 27 | } 28 | 29 | @Inject(method = "shutdown", at = @At("HEAD")) 30 | public void shutdown(CallbackInfo callbackInfo) { 31 | ConfigManager.INSTANCE.saveConfigs(); 32 | } 33 | 34 | @Inject(method={"runTick()V"}, at={@At(value="RETURN")}) 35 | private void runTick(CallbackInfo callbackInfo) { 36 | if (Minecraft.getMinecraft().currentScreen instanceof GuiMainMenu) { 37 | // Minecraft.getMinecraft().displayGuiScreen((GuiScreen)new GuiMainMenuScreen()); 38 | 39 | } 40 | } 41 | 42 | @Inject(method={"displayGuiScreen"}, at={@At(value="HEAD")}) 43 | private void displayGuiScreen(GuiScreen screen, CallbackInfo ci) { 44 | if (screen instanceof GuiMainMenu) { 45 | // this.displayGuiScreen(new GuiMainMenuScreen(), ci); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/client/InteligentGui.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.client; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingInteger; 7 | import halq.misericordia.fun.gui.igui.ClickGuiScreen; 8 | import halq.misericordia.fun.gui.main.GuiMainMenuScreen; 9 | import halq.misericordia.fun.utils.utils.ColorUtil; 10 | import org.lwjgl.input.Keyboard; 11 | 12 | import java.awt.*; 13 | 14 | /** 15 | * @author Halq 16 | * @since 27/05/2023 at 16:54 17 | */ 18 | 19 | public class InteligentGui extends Module { 20 | 21 | public static InteligentGui INSTANCE; 22 | 23 | public SettingInteger red = create("Red", 133, 0, 255); 24 | public SettingInteger green = create("Green", 43, 0, 255); 25 | public SettingInteger blue = create("Blue", 255, 0, 255); 26 | public SettingInteger alpha = create("Alpha", 255, 0, 255); 27 | public SettingBoolean rainbow = create("Rainbow", false); 28 | 29 | public InteligentGui() { 30 | super("InteligentGui", Category.OTHER); 31 | if (getKey() == 0) { 32 | setKey(Keyboard.KEY_RSHIFT); 33 | } 34 | INSTANCE = this; 35 | } 36 | 37 | @Override 38 | public void onSetting() { 39 | if (rainbow.getValue()) { 40 | Color rainbowColor = new Color(ColorUtil.getRainbow(70 * 100, 0, (float) 100 / 100.0f, (float) 100 / 100.0f)); 41 | red.setValue(rainbowColor.getRed()); 42 | green.setValue(rainbowColor.getGreen()); 43 | blue.setValue(rainbowColor.getBlue()); 44 | } 45 | } 46 | 47 | @Override 48 | public void onEnable() { 49 | mc.displayGuiScreen(new ClickGuiScreen()); 50 | setDisabled(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/world/FastEat.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.world; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingInteger; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import net.minecraft.client.entity.EntityPlayerSP; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraft.item.ItemFood; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.util.EnumHand; 13 | 14 | /** 15 | * @author Halq 16 | * @since 02/07/2023 at 14:43 17 | */ 18 | 19 | public class FastEat extends Module { 20 | 21 | SettingBoolean instantEat = create("InstantEat", true); 22 | SettingInteger eatDelay = create("EatDelay", 0, 0, 1000); 23 | 24 | public FastEat() { 25 | super("FastEat", Category.RENDER); 26 | } 27 | 28 | @Override 29 | public void onUpdate() { 30 | if (Minecraftable.mc.player == null) return; 31 | if (Minecraftable.mc.player.getHeldItem(EnumHand.MAIN_HAND).getItem() instanceof ItemFood) { 32 | if (instantEat.getValue()) { 33 | Minecraftable.mc.player.setActiveHand(EnumHand.MAIN_HAND); 34 | Minecraftable.mc.playerController.processRightClick((EntityPlayerSP) Minecraftable.mc.player, Minecraftable.mc.world, EnumHand.MAIN_HAND); 35 | } else { 36 | if (Minecraftable.mc.player.getItemInUseMaxCount() >= eatDelay.getValue()) { 37 | Minecraftable.mc.player.setActiveHand(EnumHand.MAIN_HAND); 38 | Minecraftable.mc.playerController.processRightClick((EntityPlayerSP) Minecraftable.mc.player, Minecraftable.mc.world, EnumHand.MAIN_HAND); 39 | } 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinNetworkManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import io.netty.channel.ChannelHandlerContext; 4 | import halq.misericordia.fun.core.eventcore.MisericordiaEvents; 5 | import halq.misericordia.fun.events.PacketEvent; 6 | import halq.misericordia.fun.utils.utils.TimerUtil; 7 | import net.minecraft.network.NetworkManager; 8 | import net.minecraft.network.Packet; 9 | import net.minecraft.util.text.ITextComponent; 10 | import net.minecraftforge.common.MinecraftForge; 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(value = {NetworkManager.class}) 17 | public class MixinNetworkManager { 18 | 19 | TimerUtil timer = new TimerUtil(); 20 | 21 | @Inject(method = "sendPacket(Lnet/minecraft/network/Packet;)V", at = @At("HEAD"), cancellable = true) 22 | public void onPacketSend(Packet packet, CallbackInfo ci) { 23 | PacketEvent.PacketSendEvent event = new PacketEvent.PacketSendEvent(packet, MisericordiaEvents.Stage.PRE); 24 | MinecraftForge.EVENT_BUS.post(event); 25 | 26 | if (event.isCanceled()) 27 | ci.cancel(); 28 | } 29 | 30 | @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) 31 | public void onPacketReceive(ChannelHandlerContext chc, Packet packet, CallbackInfo ci) { 32 | PacketEvent.PacketReceiveEvent event = new PacketEvent.PacketReceiveEvent(packet, MisericordiaEvents.Stage.PRE); 33 | MinecraftForge.EVENT_BUS.post(event); 34 | 35 | if (event.isCanceled()) 36 | ci.cancel(); 37 | } 38 | 39 | @Inject(method = "closeChannel", at = @At("HEAD")) 40 | public void preCloseChannel(ITextComponent message, CallbackInfo callbackInfo) { 41 | timer.reset(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/utils/TimerUtil.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils.utils; 2 | 3 | /** 4 | * @author accessmodifier364 5 | * @since 24-Nov-2021 6 | */ 7 | 8 | public class TimerUtil { 9 | 10 | long startTime = System.currentTimeMillis(); 11 | long delay = 0L; 12 | boolean paused = false; 13 | private long time = -1L; 14 | 15 | public boolean isPassed() { 16 | return !this.paused && System.currentTimeMillis() - this.startTime >= this.delay; 17 | } 18 | 19 | public boolean passed(final long ms) { 20 | return this.getTime(System.nanoTime() - this.time) >= ms; 21 | } 22 | 23 | public long getTime(final long time) { 24 | return time / 1000000L; 25 | } 26 | 27 | public void resetDelay() { 28 | this.startTime = System.currentTimeMillis(); 29 | } 30 | 31 | public void setDelay(long delay) { 32 | this.delay = delay; 33 | } 34 | 35 | public boolean isPaused() { 36 | return this.paused; 37 | } 38 | 39 | public void setPaused(boolean paused) { 40 | this.paused = paused; 41 | } 42 | 43 | public long getStartTime() { 44 | return this.startTime; 45 | } 46 | 47 | public boolean passedMs(long ms) { 48 | return this.passedNS(this.convertToNS(ms)); 49 | } 50 | 51 | public boolean passedNS(long ns) { 52 | return System.nanoTime() - this.time >= ns; 53 | } 54 | 55 | public long getPassedTimeMs() { 56 | return this.getMs(System.nanoTime() - this.time); 57 | } 58 | 59 | public void reset() { 60 | this.time = System.nanoTime(); 61 | } 62 | 63 | public long getMs(long time) { 64 | return time / 1000000L; 65 | } 66 | 67 | public boolean hasPassed(double ms) { 68 | return System.currentTimeMillis() - time >= ms; 69 | } 70 | 71 | public long convertToNS(long time) { 72 | return time * 1000000L; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/commands/Bind.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import halq.misericordia.fun.core.commandcore.Command; 5 | import halq.misericordia.fun.core.modulecore.Module; 6 | import halq.misericordia.fun.managers.module.ModuleManager; 7 | import halq.misericordia.fun.utils.utils.MessageUtil; 8 | import org.lwjgl.input.Keyboard; 9 | 10 | /** 11 | * @author accessmodifier364 12 | * @since 24-Nov-2021 13 | */ 14 | 15 | public class Bind extends Command { 16 | 17 | public Bind() { 18 | super("bind", new String[]{"[module]", "[key]"}); 19 | } 20 | 21 | @Override 22 | public void execute(String[] commands) { 23 | 24 | if (commands.length == 1) { 25 | MessageUtil.sendMessage(getCommandPrefix() + "bind " + ChatFormatting.AQUA + "[module] [key]"); 26 | return; 27 | } 28 | 29 | String rkey = commands[1]; 30 | String moduleName = commands[0]; 31 | Module module = ModuleManager.INSTANCE.getModule(moduleName); 32 | 33 | if (module == null) { 34 | MessageUtil.sendMessage("That module does not exist."); 35 | return; 36 | } 37 | 38 | if (rkey == null) { 39 | MessageUtil.sendMessage(getCommandPrefix() + "bind " + ChatFormatting.AQUA + "[module] [key]"); 40 | return; 41 | } 42 | 43 | int key = Keyboard.getKeyIndex(rkey.toUpperCase()); 44 | 45 | if (rkey.equalsIgnoreCase("none")) { 46 | key = 0; 47 | } 48 | 49 | if (key == 0) { 50 | module.setKey(key); 51 | MessageUtil.sendMessage(module.getName() + " keybind has been set to NONE."); 52 | return; 53 | } 54 | 55 | module.setKey(key); 56 | MessageUtil.sendMessage(module.getName() + " keybind has been set to " + rkey.toUpperCase() + "."); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/utils/GeometryMasks.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils.utils; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | 5 | import java.util.HashMap; 6 | 7 | public final class GeometryMasks { 8 | 9 | public static final HashMap FACEMAP = new HashMap<>(); 10 | 11 | static { 12 | FACEMAP.put(EnumFacing.DOWN, Quad.DOWN); 13 | FACEMAP.put(EnumFacing.WEST, Quad.WEST); 14 | FACEMAP.put(EnumFacing.NORTH, Quad.NORTH); 15 | FACEMAP.put(EnumFacing.SOUTH, Quad.SOUTH); 16 | FACEMAP.put(EnumFacing.EAST, Quad.EAST); 17 | FACEMAP.put(EnumFacing.UP, Quad.UP); 18 | } 19 | 20 | public static final class Quad { 21 | public static final int DOWN = 0x01; 22 | public static final int UP = 0x02; 23 | public static final int NORTH = 0x04; 24 | public static final int SOUTH = 0x08; 25 | public static final int WEST = 0x10; 26 | public static final int EAST = 0x20; 27 | public static final int ALL = DOWN | UP | NORTH | SOUTH | WEST | EAST; 28 | } 29 | 30 | public static final class Line { 31 | public static final int DOWN_WEST = 0x11; 32 | public static final int UP_WEST = 0x12; 33 | public static final int DOWN_EAST = 0x21; 34 | public static final int UP_EAST = 0x22; 35 | public static final int DOWN_NORTH = 0x05; 36 | public static final int UP_NORTH = 0x06; 37 | public static final int DOWN_SOUTH = 0x09; 38 | public static final int UP_SOUTH = 0x0A; 39 | public static final int NORTH_WEST = 0x14; 40 | public static final int NORTH_EAST = 0x24; 41 | public static final int SOUTH_WEST = 0x18; 42 | public static final int SOUTH_EAST = 0x28; 43 | public static final int ALL = DOWN_WEST | UP_WEST | DOWN_EAST | UP_EAST | DOWN_NORTH | UP_NORTH | DOWN_SOUTH | UP_SOUTH | NORTH_WEST | NORTH_EAST | SOUTH_WEST | SOUTH_EAST; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/killaura/KillAuraRender.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.killaura; 2 | 3 | import net.minecraft.client.renderer.GlStateManager; 4 | import org.lwjgl.opengl.GL11; 5 | 6 | /** 7 | * @author Halq 8 | * @since 05/06/2023 at 18:06 9 | */ 10 | 11 | public class KillAuraRender { 12 | 13 | public static void renderChams1(){ 14 | GlStateManager.pushMatrix(); 15 | GlStateManager.color(KillAura.INSTANCE.red.getValue().floatValue() / 255.0F, KillAura.INSTANCE.green.getValue().floatValue() / 255.0F, KillAura.INSTANCE.blue.getValue().floatValue() / 255.0F, KillAura.INSTANCE.alpha.getValue().floatValue() / 255.0F); 16 | GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); 17 | GL11.glPolygonOffset(1.0F, -1000000F); 18 | GL11.glDisable(GL11.GL_TEXTURE_2D); 19 | GlStateManager.enableBlend(); 20 | GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); 21 | GlStateManager.disableAlpha(); 22 | GlStateManager.scale(1.001F, 1.001F, 1.001F); 23 | GlStateManager.translate(0F, -0.001f, 0.0F); 24 | } 25 | 26 | public static void renderChams2(){ 27 | GlStateManager.enableAlpha(); 28 | GlStateManager.disableBlend(); 29 | GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); 30 | GlStateManager.popMatrix(); 31 | } 32 | 33 | public static void renderWireframe1(){ 34 | GL11.glPushMatrix(); 35 | GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); 36 | GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); 37 | GL11.glDisable(GL11.GL_TEXTURE_2D); 38 | GL11.glDisable(GL11.GL_LIGHTING); 39 | GL11.glDisable(GL11.GL_DEPTH_TEST); 40 | GL11.glEnable(GL11.GL_LINE_SMOOTH); 41 | GL11.glEnable(GL11.GL_BLEND); 42 | GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); 43 | GlStateManager.color(KillAura.INSTANCE.red.getValue().floatValue() / 255.0F, KillAura.INSTANCE.green.getValue().floatValue() / 255.0F, KillAura.INSTANCE.blue.getValue().floatValue() / 255.0F, KillAura.INSTANCE.alpha.getValue().floatValue() / 255.0F); 44 | GlStateManager.glLineWidth(1.5F); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/aimbot/AimBot.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.aimbot; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import halq.misericordia.fun.executor.settings.SettingDouble; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.item.ItemBow; 9 | import net.minecraft.util.EnumHand; 10 | import net.minecraft.util.math.BlockPos; 11 | import net.minecraft.util.math.Vec3d; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | public class AimBot extends Module { 17 | 18 | SettingDouble range = create("Range", 10, 0.0, 30.0); 19 | SettingBoolean onlyBow = create("OnlyBow", true); 20 | public AimBot() { 21 | super("AimBot", Category.COMBAT); 22 | } 23 | 24 | EntityPlayer target; 25 | 26 | @Override 27 | public void onUpdate() { 28 | 29 | for (EntityPlayer player : mc.world.playerEntities) { 30 | if (player != mc.player) { 31 | target = player; 32 | } 33 | } 34 | 35 | if (target != null && mc.player.getDistance(target) <= range.getValue()){ 36 | if(onlyBow.getValue()) { 37 | if (mc.player.getHeldItem(EnumHand.MAIN_HAND).getItem() instanceof ItemBow) { 38 | mc.player.rotationYaw = getRotations(target)[0]; 39 | mc.player.rotationPitch = getRotations(target)[1]; 40 | } 41 | } else { 42 | mc.player.rotationYaw = getRotations(target)[0]; 43 | mc.player.rotationPitch = getRotations(target)[1]; 44 | } 45 | } 46 | } 47 | 48 | public float[] getRotations(EntityPlayer target) { 49 | double x = target.posX - mc.player.posX; 50 | double y = target.posY + target.getEyeHeight() - (mc.player.posY + mc.player.getEyeHeight()); 51 | double z = target.posZ - mc.player.posZ; 52 | double dist = Math.sqrt(x * x + z * z); 53 | float yaw = (float) Math.toDegrees(Math.atan2(z, x)) - 90.0f; 54 | float pitch = (float) (-Math.toDegrees(Math.atan2(y, dist))); 55 | return new float[]{yaw, pitch}; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/CrossHair.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.events.PacketEvent; 6 | import halq.misericordia.fun.utils.utils.RenderUtil; 7 | import halq.misericordia.fun.utils.utils.TimerUtil; 8 | import net.minecraft.client.gui.ScaledResolution; 9 | import net.minecraft.network.play.client.CPacketUseEntity; 10 | import net.minecraftforge.client.event.RenderGameOverlayEvent; 11 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 12 | 13 | import java.util.Timer; 14 | 15 | /** 16 | * @author Halq 17 | * @since 30/06/2023 at 21:19 18 | */ 19 | 20 | public class CrossHair extends Module { 21 | 22 | public CrossHair() { 23 | super("CrossHair", Category.RENDER); 24 | } 25 | 26 | TimerUtil timer = new TimerUtil(); 27 | 28 | @SubscribeEvent 29 | public void onRenderGameOverlay(RenderGameOverlayEvent event) { 30 | if (event.getType() == RenderGameOverlayEvent.ElementType.CROSSHAIRS) { 31 | event.setCanceled(true); 32 | } 33 | 34 | int screenWidth = new ScaledResolution(mc).getScaledWidth(); 35 | int screenHeight = new ScaledResolution(mc).getScaledHeight(); 36 | 37 | RenderUtil.drawLine((float) ((screenWidth / 2)), (float) ((screenHeight / 2) - 10), (float) ((screenWidth / 2)), (float) ((screenHeight / 2) - 2), 3, 0xffffffff); 38 | RenderUtil.drawLine((float) ((screenWidth / 2)), (float) ((screenHeight / 2) + 10), (float) ((screenWidth / 2)), (float) ((screenHeight / 2) + 2), 3, 0xffffffff); 39 | RenderUtil.drawLine((float) ((screenWidth / 2) - 10), (float) ((screenHeight / 2)), (float) ((screenWidth / 2) - 2), (float) ((screenHeight / 2)), 3, 0xffffffff); 40 | RenderUtil.drawLine((float) ((screenWidth / 2) + 10), (float) ((screenHeight / 2)), (float) ((screenWidth / 2) + 2), (float) ((screenHeight / 2)), 3, 0xffffffff); 41 | } 42 | 43 | @SubscribeEvent 44 | public void onPacketSend(PacketEvent.PacketSendEvent event) { 45 | if (event.getPacket() instanceof CPacketUseEntity && ((CPacketUseEntity) event.getPacket()).getAction() == CPacketUseEntity.Action.ATTACK) { 46 | timer.reset(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/Breadcrumbs.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.events.RenderEvent; 6 | import halq.misericordia.fun.executor.settings.SettingDouble; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import org.lwjgl.opengl.GL11; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | 14 | /** 15 | * @author Halq 16 | * @since 05/06/2023 at 16:57 17 | */ 18 | 19 | public class Breadcrumbs extends Module { 20 | 21 | SettingDouble red = create("Red", 255.0, 0, 255); 22 | SettingDouble green = create("Green", 0.0, 0, 255); 23 | SettingDouble blue = create("Blue", 107.0, 0, 255); 24 | SettingDouble alpha = create("Alpha", 255.0, 0, 255); 25 | private final List positions; 26 | 27 | public Breadcrumbs() { 28 | super("Breadcrumbs", Category.RENDER); 29 | positions = new ArrayList<>(); 30 | } 31 | 32 | @Override 33 | public void onRender3D(RenderEvent event) { 34 | if (!isEnabled()) return; 35 | 36 | GL11.glPushMatrix(); 37 | GL11.glTranslated(-Minecraftable.mc.getRenderManager().renderPosX, -Minecraftable.mc.getRenderManager().renderPosY, -Minecraftable.mc.getRenderManager().renderPosZ); 38 | 39 | GL11.glEnable(GL11.GL_BLEND); 40 | GL11.glDisable(GL11.GL_TEXTURE_2D); 41 | GL11.glDisable(GL11.GL_DEPTH_TEST); 42 | GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); 43 | GL11.glLineWidth(1.5f); 44 | GL11.glColor4d(red.getValue() / 255.0, green.getValue() / 255.0, blue.getValue() / 255.0, alpha.getValue() / 255); 45 | 46 | GL11.glBegin(GL11.GL_LINE_STRIP); 47 | for (double[] pos : positions) { 48 | GL11.glVertex3d(pos[0], pos[1], pos[2]); 49 | } 50 | GL11.glEnd(); 51 | 52 | GL11.glDisable(GL11.GL_BLEND); 53 | GL11.glEnable(GL11.GL_TEXTURE_2D); 54 | GL11.glEnable(GL11.GL_DEPTH_TEST); 55 | 56 | GL11.glPopMatrix(); 57 | } 58 | 59 | @Override 60 | public void onUpdate() { 61 | if (!isEnabled()) return; 62 | 63 | double[] playerPos = {Minecraftable.mc.player.posX, Minecraftable.mc.player.posY, Minecraftable.mc.player.posZ}; 64 | positions.add(playerPos); 65 | 66 | if (positions.size() > 150) { 67 | positions.remove(0); 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/calcs/CrystalAuraCalcDamage.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura.calcs; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.material.Material; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.enchantment.EnchantmentHelper; 8 | import net.minecraft.entity.Entity; 9 | import net.minecraft.entity.EntityLivingBase; 10 | import net.minecraft.entity.SharedMonsterAttributes; 11 | import net.minecraft.entity.player.EntityPlayer; 12 | import net.minecraft.init.Blocks; 13 | import net.minecraft.potion.Potion; 14 | import net.minecraft.util.CombatRules; 15 | import net.minecraft.util.DamageSource; 16 | import net.minecraft.util.EnumFacing; 17 | import net.minecraft.util.math.*; 18 | import net.minecraft.world.Explosion; 19 | import net.minecraft.world.World; 20 | 21 | import java.util.Arrays; 22 | import java.util.List; 23 | 24 | /** 25 | * @author Halq 26 | * @since 11/06/2023 at 15:38 27 | */ 28 | 29 | public class CrystalAuraCalcDamage implements Minecraftable { 30 | 31 | public static float getBlastReduction(EntityLivingBase entity, float damage, Explosion explosion) { 32 | if (entity instanceof EntityPlayer) { 33 | EntityPlayer ep = (EntityPlayer) entity; 34 | DamageSource ds = DamageSource.causeExplosionDamage(explosion); 35 | damage = CombatRules.getDamageAfterAbsorb(damage, (float) ep.getTotalArmorValue(), 36 | (float) ep.getEntityAttribute(SharedMonsterAttributes.ARMOR_TOUGHNESS).getAttributeValue()); 37 | 38 | int k = EnchantmentHelper.getEnchantmentModifierDamage(ep.getArmorInventoryList(), ds); 39 | float f = MathHelper.clamp(k, 0.0F, 20.0F); 40 | damage *= 1.0F - f / 25.0F; 41 | 42 | if (entity.isPotionActive(Potion.getPotionById(11))) { 43 | damage -= damage / 4; 44 | } 45 | return damage; 46 | } 47 | 48 | damage = CombatRules.getDamageAfterAbsorb(damage, (float) entity.getTotalArmorValue(), 49 | (float) entity.getEntityAttribute(SharedMonsterAttributes.ARMOR_TOUGHNESS).getAttributeValue()); 50 | return damage; 51 | } 52 | 53 | private static float getDamageMultiplied(float damage) { 54 | int diff = mc.world.getDifficulty().getId(); 55 | return damage * (diff == 0 ? 0.0f : (diff == 2 ? 1.0f : (diff == 1 ? 0.5f : 1.5f))); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /options.txt: -------------------------------------------------------------------------------- 1 | version:1343 2 | invertYMouse:false 3 | mouseSensitivity:0.5 4 | fov:1.0 5 | gamma:1.0 6 | saturation:0.0 7 | renderDistance:2 8 | guiScale:3 9 | particles:2 10 | bobView:true 11 | anaglyph3d:false 12 | maxFps:260 13 | fboEnable:true 14 | difficulty:0 15 | fancyGraphics:false 16 | ao:0 17 | renderClouds:false 18 | resourcePacks:[] 19 | incompatibleResourcePacks:[] 20 | lastServer:ssn.gg 21 | lang:en_us 22 | chatVisibility:0 23 | chatColors:true 24 | chatLinks:true 25 | chatLinksPrompt:true 26 | chatOpacity:1.0 27 | snooperEnabled:true 28 | fullscreen:false 29 | enableVsync:false 30 | useVbo:true 31 | hideServerAddress:false 32 | advancedItemTooltips:false 33 | pauseOnLostFocus:true 34 | touchscreen:false 35 | overrideWidth:0 36 | overrideHeight:0 37 | heldItemTooltips:true 38 | chatHeightFocused:1.0 39 | chatHeightUnfocused:0.44366196 40 | chatScale:1.0 41 | chatWidth:1.0 42 | mipmapLevels:0 43 | forceUnicodeFont:false 44 | reducedDebugInfo:false 45 | useNativeTransport:true 46 | entityShadows:false 47 | mainHand:right 48 | attackIndicator:1 49 | showSubtitles:false 50 | realmsNotifications:true 51 | enableWeakAttacks:false 52 | autoJump:false 53 | narrator:0 54 | tutorialStep:none 55 | key_key.attack:-100 56 | key_key.use:-99 57 | key_key.forward:17 58 | key_key.left:30 59 | key_key.back:31 60 | key_key.right:32 61 | key_key.jump:57 62 | key_key.sneak:42 63 | key_key.sprint:29 64 | key_key.drop:16 65 | key_key.inventory:18 66 | key_key.chat:20 67 | key_key.playerlist:15 68 | key_key.pickItem:-98 69 | key_key.command:53 70 | key_key.screenshot:60 71 | key_key.togglePerspective:63 72 | key_key.smoothCamera:0 73 | key_key.fullscreen:87 74 | key_key.spectatorOutlines:0 75 | key_key.swapHands:33 76 | key_key.saveToolbarActivator:46 77 | key_key.loadToolbarActivator:45 78 | key_key.advancements:38 79 | key_key.hotbar.1:2 80 | key_key.hotbar.2:3 81 | key_key.hotbar.3:4 82 | key_key.hotbar.4:5 83 | key_key.hotbar.5:6 84 | key_key.hotbar.6:7 85 | key_key.hotbar.7:8 86 | key_key.hotbar.8:9 87 | key_key.hotbar.9:10 88 | soundCategory_master:0.06291391 89 | soundCategory_music:1.0 90 | soundCategory_record:1.0 91 | soundCategory_weather:1.0 92 | soundCategory_block:1.0 93 | soundCategory_hostile:1.0 94 | soundCategory_neutral:1.0 95 | soundCategory_player:1.0 96 | soundCategory_ambient:1.0 97 | soundCategory_voice:1.0 98 | modelPart_cape:true 99 | modelPart_jacket:true 100 | modelPart_left_sleeve:true 101 | modelPart_right_sleeve:true 102 | modelPart_left_pants_leg:true 103 | modelPart_right_pants_leg:true 104 | modelPart_hat:true 105 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/console/ConsoleScreen.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.console; 2 | 3 | import halq.misericordia.fun.executor.modules.client.Console; 4 | import halq.misericordia.fun.gui.console.core.ConsoleAPI; 5 | import halq.misericordia.fun.gui.guibars.ClickBar; 6 | import halq.misericordia.fun.gui.guibars.RenderBar; 7 | import net.minecraft.client.gui.GuiScreen; 8 | import net.minecraft.util.ResourceLocation; 9 | 10 | /** 11 | * @author Halq 12 | * @since 17/06/2023 at 15:09 13 | */ 14 | 15 | public class ConsoleScreen extends GuiScreen { 16 | 17 | int x = 150; 18 | int y = 30; 19 | public static String VERSION = "b0.2"; 20 | 21 | public ConsoleScreen(){ 22 | DrawConsole.closedX = x; 23 | DrawConsole.closedY = y; 24 | DrawConsole.openX = x; 25 | DrawConsole.openY = y; 26 | } 27 | 28 | @Override 29 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 30 | DrawConsole.drawConsole(mouseX, mouseY); 31 | RenderBar.render(mouseX, mouseY, 2); 32 | super.drawScreen(mouseX, mouseY, partialTicks); 33 | } 34 | 35 | @Override 36 | public void mouseClicked(int mouseX, int mouseY, int mouseButton){ 37 | DrawConsole.mouseClicked(mouseX, mouseY, mouseButton); 38 | ClickBar.mouseClicked(mouseX, mouseY, mouseButton); 39 | } 40 | 41 | @Override 42 | public void mouseReleased(int mouseX, int mouseY, int state){ 43 | DrawConsole.mouseReleased(mouseX, mouseY, state); 44 | } 45 | 46 | @Override 47 | public void keyTyped(char typedChar, int keyCode){ 48 | DrawConsole.keyTyped(typedChar, keyCode); 49 | } 50 | 51 | @Override 52 | public void initGui(){ 53 | DrawConsole.x = DrawConsole.closedX; 54 | DrawConsole.y = DrawConsole.closedY; 55 | DrawConsole.renderX = -1500; 56 | ConsoleAPI.log("Welcome for Misericordia console, type \"help\" for a list of commands."); 57 | DrawConsole.isTyping = true; 58 | if(Console.INSTANCE.blur.getValue()){ 59 | mc.entityRenderer.loadShader(new ResourceLocation("shaders/post/blur.json")); 60 | } 61 | } 62 | 63 | @Override 64 | public void onGuiClosed(){ 65 | DrawConsole.closedX = DrawConsole.x; 66 | DrawConsole.closedY = DrawConsole.y; 67 | DrawConsole.isTyping = false; 68 | DrawConsole.selectAll = false; 69 | 70 | try { 71 | if (mc.entityRenderer.isShaderActive()) { 72 | mc.entityRenderer.getShaderGroup().deleteShaderGroup(); 73 | } 74 | } catch (Exception ignored) { 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/main/GuiMainMenuScreen.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.main; 2 | 3 | import halq.misericordia.fun.core.fontcore.CustomFont; 4 | import halq.misericordia.fun.utils.utils.RenderUtil; 5 | import net.minecraft.client.gui.Gui; 6 | import net.minecraft.client.gui.GuiScreen; 7 | import net.minecraft.util.ResourceLocation; 8 | import org.lwjgl.opengl.GL11; 9 | 10 | import java.awt.*; 11 | 12 | /** 13 | * @author Halq 14 | * @since 25/07/2023 at 17:46 15 | */ 16 | 17 | public class GuiMainMenuScreen extends GuiScreen { 18 | 19 | private final ResourceLocation backgroundTexture = new ResourceLocation("textures/texture/img_1.png"); 20 | private final ResourceLocation singlePlayerIcon = new ResourceLocation("textures/icons/singleplayer.png"); 21 | private final ResourceLocation multiplayerIcon = new ResourceLocation("textures/icons/multiplayer.png"); 22 | 23 | @Override 24 | public void drawScreen(int mouseX, int mouseY, float partialTicks) { 25 | // drawBackground(); 26 | super.drawScreen(mouseX, mouseY, partialTicks); 27 | Gui.drawRect(0, 0, width, height, new Color(0, 0, 0, 120).getRGB()); 28 | 29 | CustomFont cFont = new CustomFont(new Font("sans-serif", Font.BOLD, 30), true, true); 30 | 31 | int x = width / 2; 32 | int y = height / 2; 33 | cFont.drawString("Misericordia", x, 10, new Color(255, 255, 255, 255).getRGB()); 34 | RenderUtil.drawRoundedRect(x - 150, y - 40, 300, 80, 10, new Color(1, 1, 1, 140)); 35 | 36 | mc.getTextureManager().bindTexture(singlePlayerIcon); 37 | GL11.glPushMatrix(); 38 | GL11.glTranslatef(x - 150, y - 40, 0.0f); 39 | GL11.glBegin(7); 40 | GL11.glTexCoord2f(0.0f, 0.0f); 41 | GL11.glVertex3f(0.0f, 0.0f, 0.0f); 42 | GL11.glTexCoord2f(0.0f, 1.0f); 43 | GL11.glVertex3f(0.0f, 32.0f, 0.0f); 44 | GL11.glTexCoord2f(1.0f, 1.0f); 45 | GL11.glVertex3f(32.0f, 32.0f, 0.0f); 46 | GL11.glTexCoord2f(1.0f, 0.0f); 47 | GL11.glVertex3f(32.0f, 0.0f, 0.0f); 48 | GL11.glEnd(); 49 | GL11.glPopMatrix(); 50 | } 51 | 52 | private void drawBackground() { 53 | mc.getTextureManager().bindTexture(backgroundTexture); 54 | GL11.glPushMatrix(); 55 | GL11.glTranslatef(0, 0, 0.0f); 56 | GL11.glBegin(7); 57 | GL11.glTexCoord2f(0.0f, 0.0f); 58 | GL11.glVertex3f(0.0f, 0.0f, 0.0f); 59 | GL11.glTexCoord2f(0.0f, 1.0f); 60 | GL11.glVertex3f(0.0f, height, 0.0f); 61 | GL11.glTexCoord2f(1.0f, 1.0f); 62 | GL11.glVertex3f(width, height, 0.0f); 63 | GL11.glTexCoord2f(1.0f, 0.0f); 64 | GL11.glVertex3f(width, 0.0f, 0.0f); 65 | GL11.glEnd(); 66 | GL11.glPopMatrix(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/fallpredict/FallPredictCalcs.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.fallpredict; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import net.minecraft.util.math.BlockPos; 5 | import net.minecraft.util.math.MathHelper; 6 | import net.minecraft.world.World; 7 | 8 | import javax.swing.text.html.parser.Entity; 9 | 10 | public class FallPredictCalcs implements Minecraftable { 11 | 12 | public static BlockPos calcPos() { 13 | // Obter a posição atual do jogador 14 | if(mc.player.fallDistance > 0) { 15 | BlockPos playerPos = new BlockPos(mc.player.posX, mc.player.posY, mc.player.posZ); 16 | 17 | // Obter a altura do bloco "base" do jogador 18 | double playerBaseHeight = playerPos.getY() - mc.player.eyeHeight; 19 | 20 | // Obter a velocidade atual do jogador 21 | double playerMotionX = mc.player.motionX; 22 | double playerMotionY = mc.player.motionY; 23 | double playerMotionZ = mc.player.motionZ; 24 | 25 | // Calcular a posição prevista de queda 26 | boolean onGround = false; 27 | double predictedPosX = mc.player.posX; 28 | double predictedPosY = mc.player.posY; 29 | double predictedPosZ = mc.player.posZ; 30 | 31 | while (!onGround && predictedPosY > 0 && predictedPosY >= playerBaseHeight) { 32 | predictedPosX += playerMotionX; 33 | predictedPosY += playerMotionY; 34 | predictedPosZ += playerMotionZ; 35 | 36 | BlockPos predictedBlockPos = new BlockPos(predictedPosX, predictedPosY, predictedPosZ); 37 | onGround = mc.world.getBlockState(predictedBlockPos.down()).isFullBlock(); 38 | } 39 | 40 | // Verificar se o jogador atingiu o chão 41 | if (onGround) { 42 | predictedPosY -= playerMotionY; // Ajustar a posição Y para a posição no chão 43 | } 44 | 45 | // Arredondar para as coordenadas inteiras mais próximas 46 | int predictedBlockX = MathHelper.floor(predictedPosX); 47 | int predictedBlockY = MathHelper.floor(predictedPosY); 48 | int predictedBlockZ = MathHelper.floor(predictedPosZ); 49 | 50 | // Retornar a posição prevista 51 | return new BlockPos(predictedBlockX, predictedBlockY, predictedBlockZ); 52 | } 53 | return null; 54 | } 55 | 56 | private static BlockPos getSurfaceBlockPos( int x, int y, int z) { 57 | for (int i = y; i >= 0; i--) { 58 | BlockPos blockPos = new BlockPos(x, i, z); 59 | if (mc.world.isAirBlock(blockPos) && !mc.world.isAirBlock(blockPos.down())) { 60 | return blockPos.down(); 61 | } 62 | } 63 | return new BlockPos(x, 0, z); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/world/Notifier.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.world; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | import halq.misericordia.fun.core.modulecore.Module; 6 | import halq.misericordia.fun.events.PacketEvent; 7 | import halq.misericordia.fun.executor.settings.SettingBoolean; 8 | import halq.misericordia.fun.utils.utils.MessageUtil; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraft.network.play.server.SPacketBlockBreakAnim; 11 | import net.minecraft.network.play.server.SPacketEntityStatus; 12 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 13 | 14 | /** 15 | * @author Halq 16 | * @since 02/07/2023 at 17:55 17 | */ 18 | 19 | public class Notifier extends Module { 20 | 21 | public static Notifier INSTANCE; 22 | SettingBoolean amor = create("Armor", true); 23 | SettingBoolean totempop = create("TotemPop", true); 24 | SettingBoolean totempopplayer = create("TotemPopOtherPlayer", false, totempop.getValue()); 25 | SettingBoolean surround = create("Surround", true); 26 | //make predict id 27 | public Notifier() { 28 | super("Notifier", Category.WORLD); 29 | INSTANCE = this; 30 | } 31 | 32 | @Override 33 | public void onUpdate() { 34 | if(amor.getValue()){ 35 | if(mc.player.inventory.armorItemInSlot(3).getItemDamage() == 10){ 36 | MessageUtil.sendMessage(ChatFormatting.RED + "Your helmet is 10%!"); 37 | } 38 | 39 | if(mc.player.inventory.armorItemInSlot(2).getItemDamage() == 10){ 40 | MessageUtil.sendMessage(ChatFormatting.RED + "Your chestplate is 10%!"); 41 | } 42 | 43 | if(mc.player.inventory.armorItemInSlot(1).getItemDamage() == 10){ 44 | MessageUtil.sendMessage(ChatFormatting.RED + "Your leggings are 10%!"); 45 | } 46 | 47 | if(mc.player.inventory.armorItemInSlot(0).getItemDamage() == 10){ 48 | MessageUtil.sendMessage(ChatFormatting.RED + "Your boots are 10%!"); 49 | } 50 | } 51 | } 52 | 53 | @SubscribeEvent 54 | public void onPacketReceive(PacketEvent.PacketReceiveEvent event) { 55 | 56 | if(event.getPacket() instanceof SPacketEntityStatus){ 57 | SPacketEntityStatus packet = (SPacketEntityStatus) event.getPacket(); 58 | if(packet.getOpCode() == 35 && totempop.getValue()){ 59 | if(packet.getEntity(mc.world) == mc.player){ 60 | MessageUtil.sendMessage(ChatFormatting.RED + "You popped a totem!"); 61 | }else if(totempopplayer.getValue()){ 62 | EntityPlayer player = (EntityPlayer) packet.getEntity(mc.world); 63 | MessageUtil.sendMessage(ChatFormatting.GREEN + player.getName() + " popped a totem!"); 64 | } 65 | } 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/tracers/TracersRender.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.tracers; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import org.lwjgl.opengl.GL11; 5 | 6 | /** 7 | * @author Halq 8 | * @since 05/06/2023 at 18:02 9 | */ 10 | 11 | public class TracersRender implements Minecraftable { 12 | 13 | public static void drawLineFromPosToPos(double posX, double posY, double posZ, double posX2, double posY2, double posZ2, double up, float red, float green, float blue, float opacity, float width) { 14 | double minX = Tracers.INSTANCE.minSafeAreaX.getValue(); 15 | double minY = Tracers.INSTANCE.minSafeAreaY.getValue(); 16 | double maxX = Tracers.INSTANCE.maxSafeAreaX.getValue(); 17 | double maxY = Tracers.INSTANCE.maxSafeAreaY.getValue(); 18 | 19 | int screenWidth = mc.displayWidth; 20 | int screenHeight = mc.displayHeight; 21 | 22 | double startX = minX * screenWidth; 23 | double startY = minY * screenHeight; 24 | double endX = maxX * screenWidth; 25 | double endY = maxY * screenHeight; 26 | 27 | double clipStartX = Math.max(startX, 0); 28 | double clipStartY = Math.max(startY, 0); 29 | double clipEndX = Math.min(endX, screenWidth); 30 | double clipEndY = Math.min(endY, screenHeight); 31 | 32 | double deltaX = posX2 - posX; 33 | double deltaY = posY2 - posY; 34 | double deltaZ = posZ2 - posZ; 35 | 36 | double distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ); 37 | 38 | if (distance > 0) { 39 | double scale = Math.min(1, (clipEndX - clipStartX) / distance); 40 | deltaX *= scale; 41 | deltaY *= scale; 42 | deltaZ *= scale; 43 | } 44 | 45 | double lineEndX = posX + deltaX; 46 | double lineEndY = posY + deltaY; 47 | double lineEndZ = posZ + deltaZ; 48 | 49 | GL11.glPushAttrib(GL11.GL_SCISSOR_BIT); 50 | GL11.glEnable(GL11.GL_SCISSOR_TEST); 51 | GL11.glScissor((int) clipStartX, (int) (screenHeight - clipEndY), (int) (clipEndX - clipStartX), (int) (clipEndY - clipStartY)); 52 | GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); 53 | GL11.glEnable(GL11.GL_BLEND); 54 | GL11.glLineWidth(width); 55 | GL11.glDisable(GL11.GL_TEXTURE_2D); 56 | GL11.glDisable(GL11.GL_DEPTH_TEST); 57 | GL11.glDepthMask(false); 58 | GL11.glColor4f(red, green, blue, opacity); 59 | GL11.glLoadIdentity(); 60 | mc.entityRenderer.orientCamera(mc.getRenderPartialTicks()); 61 | GL11.glBegin(GL11.GL_LINES); 62 | GL11.glVertex3d(posX, posY, posZ); 63 | GL11.glVertex3d(lineEndX, lineEndY, lineEndZ); 64 | GL11.glEnd(); 65 | GL11.glEnable(GL11.GL_DEPTH_TEST); 66 | GL11.glDepthMask(true); 67 | GL11.glEnable(GL11.GL_TEXTURE_2D); 68 | GL11.glDisable(GL11.GL_BLEND); 69 | GL11.glColor3d(1.0, 1.0, 1.0); 70 | GL11.glPopAttrib(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/guibars/RenderBar.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.guibars; 2 | 3 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 4 | import halq.misericordia.fun.utils.Minecraftable; 5 | import halq.misericordia.fun.utils.utils.RenderUtil; 6 | import org.lwjgl.opengl.GL11; 7 | 8 | import java.awt.*; 9 | 10 | /** 11 | * @author Halq 12 | * @since 18/06/2023 at 21:29 13 | */ 14 | 15 | public class RenderBar { 16 | 17 | public static void render(int mouseX, int mouseY, int category){ 18 | RenderUtil.drawRoundedRect(290, 0, 75, 9, 5, new Color(13, 13, 23, 160)); 19 | 20 | switch (category){ 21 | case 1: 22 | RenderUtil.drawRect(290, 0, 20, 9, new Color(InteligentGui.INSTANCE.red.getValue() / 255.0f, InteligentGui.INSTANCE.green.getValue() / 255.0f, InteligentGui.INSTANCE.blue.getValue() / 255.0f, InteligentGui.INSTANCE.alpha.getValue() / 255.0f).getRGB()); 23 | if(mouseX >= 290 && mouseX <= 310 && mouseY >= 0 && mouseY <= 10){ 24 | RenderUtil.drawRect(290, 0, 20, 9, new Color(InteligentGui.INSTANCE.red.getValue() / 255.0f, InteligentGui.INSTANCE.green.getValue() / 255.0f, InteligentGui.INSTANCE.blue.getValue() / 255.0f, InteligentGui.INSTANCE.alpha.getValue() / 255.0f).getRGB()); 25 | } 26 | 27 | if(mouseX >= 310 && mouseX <= 345 && mouseY >= 0 && mouseY <= 10){ 28 | RenderUtil.drawRect(310, 0, 35, 9, new Color(35, 35, 35, 255).getRGB()); 29 | } 30 | 31 | if(mouseX >= 345 && mouseX <= 365 && mouseY >= 0 && mouseY <= 10){ 32 | RenderUtil.drawRect(345, 0, 20, 9, new Color(35, 35, 35, 255).getRGB()); 33 | } 34 | 35 | break; 36 | case 2: 37 | RenderUtil.drawRect(310, 0, 35, 9, new Color(66, 7, 245, 255).getRGB()); 38 | if(mouseX >= 290 && mouseX <= 310 && mouseY >= 0 && mouseY <= 10){ 39 | RenderUtil.drawRect(290, 0, 20, 9, new Color(35, 35, 35, 255).getRGB()); 40 | } 41 | if(mouseX >= 310 && mouseX <= 345 && mouseY >= 0 && mouseY <= 10){ 42 | RenderUtil.drawRect(310, 0, 35, 9, new Color(66, 7, 245, 255).getRGB()); 43 | } 44 | if(mouseX >= 345 && mouseX <= 365 && mouseY >= 0 && mouseY <= 10){ 45 | RenderUtil.drawRect(345, 0, 20, 9, new Color(35, 35, 35, 255).getRGB()); 46 | } 47 | break; 48 | case 3: 49 | RenderUtil.drawRoundedRect(345, 0, 20, 9, 5, new Color(255, 13, 50, 255).brighter()); 50 | break; 51 | } 52 | 53 | GL11.glPushMatrix(); 54 | GL11.glScalef(0.5f, 0.5f, 0.5f); 55 | Minecraftable.mc.fontRenderer.drawStringWithShadow("GUI", 297 * 2, 3 * 2, -1); 56 | Minecraftable.mc.fontRenderer.drawStringWithShadow("CONSOLE", 317 * 2, 3 * 2, -1); 57 | Minecraftable.mc.fontRenderer.drawStringWithShadow("HUD", 351 * 2, 3 * 2, -1); 58 | GL11.glPopMatrix(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/console/core/ConsoleScript.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.console.core; 2 | 3 | import halq.misericordia.fun.utils.Minecraftable; 4 | import halq.misericordia.fun.utils.utils.MessageUtil; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * @author Halq 11 | * @since 19/06/2023 at 19:30 12 | */ 13 | 14 | public class ConsoleScript { 15 | 16 | public static boolean scriptable = false; 17 | public static String bov; 18 | public static String exv; 19 | public static boolean boov; 20 | 21 | public static void excWSubB(String booleanValue, int booleanValueSub, String executatorValue){ 22 | boolean bv; 23 | bv = false; 24 | 25 | switch (booleanValue){ 26 | case "health": 27 | bv = Minecraftable.mc.player.getHealth() <= booleanValueSub; 28 | break; 29 | } 30 | 31 | boov = bv; 32 | 33 | if(bv) { 34 | MessageUtil.sendClientMessage("it work"); 35 | } 36 | } 37 | 38 | public static void excSubexcc(String booleanValue, String executatorValue, String executatorValueSub){ 39 | boolean bv; 40 | int booleanSubValue; 41 | String ev = executatorValue; 42 | 43 | bv = false; 44 | 45 | switch (booleanValue) { 46 | case "health": 47 | bv = Minecraftable.mc.player.getHealth() < 300; 48 | break; 49 | } 50 | 51 | boov = bv; 52 | 53 | if(bv) { 54 | MessageUtil.sendClientMessage("it work"); 55 | } 56 | } 57 | 58 | public static void exc(String booleanValue, String executatorValue) { 59 | boolean bv; 60 | String ev = executatorValue; 61 | 62 | bv = false; 63 | 64 | switch (booleanValue) { 65 | case "isInWater": 66 | bv = Minecraftable.mc.player.isInWater(); 67 | break; 68 | 69 | case "isInLava": 70 | bv = Minecraftable.mc.player.isInLava(); 71 | break; 72 | 73 | case "isInWeb": 74 | bv = Minecraftable.mc.player.isInWeb; 75 | break; 76 | } 77 | 78 | boov = bv; 79 | 80 | if(bv) { 81 | MessageUtil.sendClientMessage("it work"); 82 | } 83 | } 84 | 85 | public static List booleans(){ 86 | List booleansValues = new ArrayList<>(); 87 | booleansValues.add("health"); 88 | booleansValues.add("isInWater"); 89 | booleansValues.add("isInLava"); 90 | booleansValues.add("isInWeb"); 91 | return booleansValues; 92 | } 93 | 94 | public static List excs(){ 95 | List excsValues = new ArrayList<>(); 96 | excsValues.add("sendMessage"); 97 | excsValues.add("disconnect"); 98 | return excsValues; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinRendererLivingEntity.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import halq.misericordia.fun.managers.module.ModuleManager; 4 | import halq.misericordia.fun.executor.modules.combat.killaura.KillAura; 5 | import halq.misericordia.fun.executor.modules.combat.killaura.KillAuraRender; 6 | import halq.misericordia.fun.managers.shader.Flow; 7 | import halq.misericordia.fun.managers.shader.FramebufferShader; 8 | import net.minecraft.client.model.ModelBase; 9 | import net.minecraft.client.renderer.entity.Render; 10 | import net.minecraft.client.renderer.entity.RenderLivingBase; 11 | import net.minecraft.client.renderer.entity.RenderManager; 12 | import net.minecraft.entity.EntityLivingBase; 13 | import org.lwjgl.opengl.GL11; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | import org.spongepowered.asm.mixin.injection.At; 17 | import org.spongepowered.asm.mixin.injection.Inject; 18 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 19 | 20 | import java.awt.*; 21 | 22 | @Mixin(RenderLivingBase.class) 23 | public abstract class MixinRendererLivingEntity extends Render { 24 | 25 | @Shadow 26 | protected ModelBase mainModel; 27 | 28 | protected MixinRendererLivingEntity(RenderManager renderManager) { 29 | super(renderManager); 30 | } 31 | 32 | @Shadow 33 | protected abstract void renderModel(T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor); 34 | 35 | @Inject(method = "renderModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBase;render(Lnet/minecraft/entity/Entity;FFFFFF)V"), cancellable = true) 36 | private void renderModel(EntityLivingBase entityLivingBase, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, CallbackInfo info) { 37 | if (ModuleManager.INSTANCE.getModule(KillAura.class).isEnabled()) { 38 | entityLivingBase.hurtTime = 0; 39 | if (KillAura.INSTANCE.target != null && KillAura.INSTANCE.render.getValue()) { 40 | if (entityLivingBase == KillAura.INSTANCE.target) { 41 | if (KillAura.INSTANCE.renderMode.getValue().equalsIgnoreCase("Chams")) { 42 | KillAuraRender.renderChams1(); 43 | this.mainModel.render(entityLivingBase, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); 44 | KillAuraRender.renderChams2(); 45 | } else if (KillAura.INSTANCE.renderMode.getValue().equalsIgnoreCase("Wireframe")) { 46 | KillAuraRender.renderWireframe1(); 47 | this.mainModel.render(entityLivingBase, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); 48 | GL11.glPopAttrib(); 49 | GL11.glPopMatrix(); 50 | } 51 | } 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/SettingScreenComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 4 | import halq.misericordia.fun.executor.settings.SettingBoolean; 5 | import halq.misericordia.fun.executor.settings.SettingScreen; 6 | import halq.misericordia.fun.gui.igui.components.Component; 7 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 8 | import halq.misericordia.fun.utils.utils.RenderUtil; 9 | import net.minecraft.client.Minecraft; 10 | import net.minecraft.client.gui.Gui; 11 | import org.lwjgl.opengl.GL11; 12 | 13 | import java.awt.*; 14 | 15 | /** 16 | * @author Halq 17 | * @since 23/06/2023 at 18:57 18 | */ 19 | 20 | public class SettingScreenComponent implements Component { 21 | 22 | private final Minecraft mc = Minecraft.getMinecraft(); 23 | public int x; 24 | public int y; 25 | public int height; 26 | int width; 27 | SettingScreen setting; 28 | ModuleComponent moduleComponent; 29 | public boolean notVisible = false; 30 | 31 | public SettingScreenComponent(ModuleComponent moduleComponent, int x, int y, SettingScreen setting) { 32 | this.moduleComponent = moduleComponent; 33 | this.x = x; 34 | this.y = y; 35 | this.setting = setting; 36 | width = 88; 37 | height = 13; 38 | boolean notVisible = !setting.getVisible(); 39 | } 40 | 41 | @Override 42 | public void render(int mouseX, int mouseY) { 43 | if (setting.getVisible()) { 44 | height = 13; 45 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 46 | Gui.drawRect(x + 4, y + 2, x + height + 2, y + height - 2, new Color(13, 13, 23, 182).brighter().getRGB()); 47 | 48 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 49 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 50 | } 51 | 52 | GL11.glPushMatrix(); 53 | GL11.glScalef(0.5f, 0.5f, 0.5f); 54 | mc.fontRenderer.drawStringWithShadow(setting.getName(), (this.x + 20) * 2 + 5, (this.y + 2.5f) * 2 + 5, -1); 55 | GL11.glPopMatrix(); 56 | 57 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 58 | } else { 59 | height -= 13; 60 | y = 0; 61 | moduleComponent.buttonHeight -= 13; 62 | } 63 | } 64 | 65 | @Override 66 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 67 | if (setting.getVisible()) { 68 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 69 | mc.displayGuiScreen(setting.getScreen()); 70 | } 71 | } 72 | } 73 | 74 | @Override 75 | public void mouseReleased(int mouseX, int mouseY, int state) { 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/Misercordia.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor; 2 | 3 | import halq.misericordia.fun.gui.console.core.ConsoleAPI; 4 | import halq.misericordia.fun.gui.igui.ClickGuiScreen; 5 | import halq.misericordia.fun.managers.command.CommandManager; 6 | import halq.misericordia.fun.managers.config.ConfigManager; 7 | import halq.misericordia.fun.managers.text.TextManager; 8 | import halq.misericordia.fun.managers.module.ModuleManager; 9 | import halq.misericordia.fun.managers.setting.SettingManager; 10 | import halq.misericordia.fun.utils.utils.IconsUtil; 11 | import net.minecraft.client.Minecraft; 12 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 13 | import net.minecraftforge.common.MinecraftForge; 14 | import net.minecraftforge.fml.common.Mod; 15 | import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; 16 | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; 17 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 18 | import org.lwjgl.opengl.Display; 19 | 20 | import java.io.InputStream; 21 | import java.nio.ByteBuffer; 22 | 23 | @Mod(modid = Misercordia.MOD_ID, name = Misercordia.MOD_NAME, version = Misercordia.VERSION) 24 | public class Misercordia { 25 | // 26 | public static final String MOD_ID = "misericordia"; 27 | public static final String MOD_NAME = "Misericordia"; 28 | public static final String VERSION = "0.0.3"; 29 | 30 | public ClickGuiScreen clickGuiScreen; 31 | 32 | @Mod.Instance 33 | public static Misercordia INSTANCE; 34 | 35 | /** 36 | * Is better setup all using postInit, the loader has more time to load all. 37 | */ 38 | 39 | @Mod.EventHandler 40 | public void postInit(FMLPostInitializationEvent event) { 41 | Display.setTitle(MOD_NAME + " " + VERSION); 42 | 43 | SettingManager.INSTANCE = new SettingManager(); 44 | ConfigManager.INSTANCE = new ConfigManager(); 45 | TextManager.INSTANCE = new TextManager(); 46 | ModuleManager.INSTANCE = new ModuleManager(); 47 | CommandManager.INSTANCE = new CommandManager(); 48 | ConfigManager.INSTANCE.loadConfigs(); 49 | clickGuiScreen = new ClickGuiScreen(); 50 | 51 | MinecraftForge.EVENT_BUS.register(this); 52 | } 53 | 54 | @Mod.EventHandler 55 | public void preInit(FMLPreInitializationEvent event) { 56 | this.setIcon(); 57 | } 58 | 59 | public static void setWindowIcon() { 60 | //from europa client 61 | try (InputStream inputStream16x = Minecraft.class.getResourceAsStream("/assets/misericordia/icon16.png"); 62 | InputStream inputStream32x = Minecraft.class.getResourceAsStream("/assets/misericordia/icon32.png")) { 63 | ByteBuffer[] icons = new ByteBuffer[]{IconsUtil.INSTANCE.readImageToBuffer(inputStream16x), IconsUtil.INSTANCE.readImageToBuffer(inputStream32x)}; 64 | Display.setIcon(icons); 65 | } catch (Exception e) { 66 | e.printStackTrace(); 67 | } 68 | } 69 | 70 | public void setIcon() { 71 | this.setWindowIcon(); 72 | } 73 | 74 | @SubscribeEvent 75 | public void onChatReceived(ClientChatReceivedEvent event) { 76 | if (ConsoleAPI.chatlog) { 77 | ConsoleAPI.log(event.getMessage().getUnformattedText()); 78 | } 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/exploits/Burrow.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.exploits; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingBoolean; 6 | import net.minecraft.network.play.client.CPacketPlayer; 7 | import net.minecraft.util.EnumFacing; 8 | import net.minecraft.util.EnumHand; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraft.util.math.Vec3d; 11 | import net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent; 12 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 13 | 14 | import java.util.concurrent.Executors; 15 | import java.util.concurrent.ScheduledExecutorService; 16 | import java.util.concurrent.TimeUnit; 17 | 18 | /** 19 | * @author Halq 20 | * @since 30/07/2023 at 22:27 21 | */ 22 | 23 | public class Burrow extends Module { 24 | 25 | SettingBoolean rotate = create("Rotate", false); 26 | SettingBoolean strict = create("Strict", false); 27 | 28 | public Burrow(){ 29 | super("Burrow", Category.EXPLOITS); 30 | } 31 | 32 | @Override 33 | public void onUpdate(){ 34 | BlockPos playerPos = new BlockPos(mc.player.posX, mc.player.posY, mc.player.posZ); 35 | EnumFacing facing = EnumFacing.UP; 36 | EnumHand hand = EnumHand.MAIN_HAND; 37 | 38 | if (mc.player.getHeldItem(hand).isEmpty()) { 39 | setDisabled(); 40 | return; 41 | } 42 | 43 | Vec3d vec = new Vec3d(playerPos).add(0.5, 0.5, 0.5).add(new Vec3d(facing.getDirectionVec()).scale(0.5)); 44 | 45 | ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1); 46 | 47 | double posX = mc.player.posX; 48 | double posY = mc.player.posY; 49 | double posZ = mc.player.posZ; 50 | 51 | Runnable task = () -> { 52 | mc.player.connection.sendPacket(new CPacketPlayer.Position(posX, posY + 0.42, posZ, true)); 53 | mc.player.connection.sendPacket(new CPacketPlayer.Position(posX, posY + 0.75, posZ, true)); 54 | mc.player.connection.sendPacket(new CPacketPlayer.Position(posX, posY + 1.01, posZ, true)); 55 | mc.player.connection.sendPacket(new CPacketPlayer.Position(posX, posY + 1.16, posZ, true)); 56 | 57 | mc.player.setPosition(posX, posY + 1.16610926093821D, posZ); 58 | mc.playerController.processRightClickBlock(mc.player, mc.world, playerPos, facing, vec, hand); // Simulate player behavior 59 | 60 | mc.player.setPosition(posX, posY - 1.16610926093821D, posZ); 61 | mc.player.connection.sendPacket(new CPacketPlayer.Position(posX, posY + 0.01, posZ, false)); 62 | setDisabled(); 63 | }; 64 | 65 | executorService.schedule(task, 50, TimeUnit.MILLISECONDS); 66 | executorService.schedule(task, 100, TimeUnit.MILLISECONDS); 67 | executorService.schedule(task, 150, TimeUnit.MILLISECONDS); 68 | executorService.schedule(task, 200, TimeUnit.MILLISECONDS); 69 | executorService.schedule(task, 300, TimeUnit.MILLISECONDS); 70 | executorService.schedule(task, 350, TimeUnit.MILLISECONDS); 71 | 72 | executorService.shutdown(); 73 | } 74 | 75 | @SubscribeEvent 76 | public void onBlockPush(PlayerSPPushOutOfBlocksEvent event){ 77 | event.setCanceled(true); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinRenderPlayer.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import halq.misericordia.fun.managers.module.ModuleManager; 4 | import halq.misericordia.fun.executor.modules.render.HandChams; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.entity.AbstractClientPlayer; 7 | import net.minecraft.client.renderer.OpenGlHelper; 8 | import net.minecraft.client.renderer.entity.RenderPlayer; 9 | import org.lwjgl.opengl.GL11; 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 | /** 16 | * @author Halq 17 | * @since 04/06/2023 at 20:34 18 | */ 19 | 20 | @Mixin({RenderPlayer.class}) 21 | public class MixinRenderPlayer { 22 | 23 | public void renderArmHook(AbstractClientPlayer clientPlayer, CallbackInfo ci, boolean isRightArm) { 24 | if (clientPlayer != Minecraft.getMinecraft().player && ModuleManager.INSTANCE.getModule("HandChams").isEnabled()) { 25 | return; 26 | } 27 | GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); 28 | GL11.glDisable(GL11.GL_TEXTURE_2D); 29 | GL11.glEnable(GL11.GL_BLEND); 30 | GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); 31 | GL11.glLineWidth(1.5F); 32 | GL11.glEnable(GL11.GL_LINE_SMOOTH); 33 | GL11.glEnable(GL11.GL_COLOR_MATERIAL); 34 | OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F); 35 | GL11.glColor4f(HandChams.INSTANCE.red.getValue().floatValue() / 255.0F, HandChams.INSTANCE.green.getValue().floatValue() / 255.0F, HandChams.INSTANCE.blue.getValue().floatValue() / 255.0F, HandChams.INSTANCE.alpha.getValue().floatValue() / 255.0F); 36 | } 37 | 38 | public void renderArmReturn(AbstractClientPlayer clientPlayer, CallbackInfo ci) { 39 | if (clientPlayer != Minecraft.getMinecraft().player && ModuleManager.INSTANCE.getModule("HandChams").isEnabled()) { 40 | return; 41 | } 42 | GL11.glEnable(GL11.GL_TEXTURE_2D); 43 | GL11.glDisable(GL11.GL_BLEND); 44 | GL11.glDisable(GL11.GL_LINE_SMOOTH); 45 | GL11.glDisable(GL11.GL_COLOR_MATERIAL); 46 | GL11.glPopAttrib(); 47 | } 48 | 49 | @Inject(method = "renderRightArm", at = @At(value = "FIELD", target = "Lnet/minecraft/client/model/ModelPlayer;swingProgress:F", opcode = 181), cancellable = true) 50 | public void renderRightArmHook(AbstractClientPlayer clientPlayer, CallbackInfo ci) { 51 | renderArmHook(clientPlayer, ci, true); 52 | } 53 | 54 | @Inject(method = "renderRightArm", at = @At("RETURN"), cancellable = true) 55 | public void renderRightArmReturn(AbstractClientPlayer clientPlayer, CallbackInfo ci) { 56 | renderArmReturn(clientPlayer, ci); 57 | } 58 | 59 | @Inject(method = "renderLeftArm", at = @At(value = "FIELD", target = "Lnet/minecraft/client/model/ModelPlayer;swingProgress:F", opcode = 181), cancellable = true) 60 | public void renderLeftArmHook(AbstractClientPlayer clientPlayer, CallbackInfo ci) { 61 | renderArmHook(clientPlayer, ci, false); 62 | } 63 | 64 | @Inject(method = "renderLeftArm", at = @At("RETURN"), cancellable = true) 65 | public void renderLeftArmReturn(AbstractClientPlayer clientPlayer, CallbackInfo ci) { 66 | renderArmReturn(clientPlayer, ci); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/particles/Particles.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.particles; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraftforge.fml.relauncher.Side; 5 | import net.minecraftforge.fml.relauncher.SideOnly; 6 | 7 | import java.awt.*; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | import java.util.Random; 11 | 12 | import static halq.misericordia.fun.gui.igui.components.particles.Particle.drawCircle; 13 | 14 | /** 15 | * @author Halq 16 | * @since 30/07/2023 at 23:34 17 | */ 18 | 19 | @SideOnly(Side.CLIENT) 20 | public class Particles { 21 | 22 | private static final List particles = new ArrayList<>(); 23 | private static int amount; 24 | private static int prevWidth; 25 | private static int prevHeight; 26 | 27 | public Particles(final int amount) { 28 | Particles.amount = amount; 29 | } 30 | 31 | public void draw(final int mouseX, final int mouseY) { 32 | checkForScreenResize(); 33 | 34 | for (final Particle particle : particles) { 35 | updateParticlePosition(particle); 36 | connectNearbyParticles(particle, mouseX, mouseY); 37 | drawParticle(particle); 38 | } 39 | } 40 | 41 | private static void checkForScreenResize() { 42 | if (particles.isEmpty() || prevWidth != Minecraft.getMinecraft().displayWidth || prevHeight != Minecraft.getMinecraft().displayHeight) { 43 | particles.clear(); 44 | createParticles(); 45 | } 46 | 47 | prevWidth = Minecraft.getMinecraft().displayWidth; 48 | prevHeight = Minecraft.getMinecraft().displayHeight; 49 | } 50 | 51 | private static void createParticles() { 52 | final Random random = new Random(); 53 | 54 | for (int i = 0; i < amount; i++) 55 | particles.add(new Particle(random.nextInt(Minecraft.getMinecraft().displayWidth), random.nextInt(Minecraft.getMinecraft().displayHeight))); 56 | } 57 | 58 | private static void updateParticlePosition(Particle particle) { 59 | particle.fall(); 60 | particle.interpolation(); 61 | } 62 | 63 | private static void connectNearbyParticles(Particle particle, int mouseX, int mouseY) { 64 | int range = 30; 65 | final boolean mouseOver = (mouseX >= particle.getX() - range) && (mouseY >= particle.getY() - range) && 66 | (mouseX <= particle.getX() + range) && (mouseY <= particle.getY() + range); 67 | 68 | if (mouseOver) { 69 | for (Particle connectable : particles) { 70 | if (isConnectable(particle, connectable, range)) { 71 | particle.connect(connectable.getX(), connectable.getY()); 72 | } 73 | } 74 | } 75 | } 76 | 77 | private static boolean isConnectable(Particle particle, Particle connectable, int range) { 78 | return (connectable.getX() > particle.getX() && connectable.getX() - particle.getX() < range 79 | && particle.getX() - connectable.getX() < range) 80 | && (connectable.getY() > particle.getY() && connectable.getY() - particle.getY() < range 81 | || particle.getY() > connectable.getY() && particle.getY() - connectable.getY() < range); 82 | } 83 | 84 | private static void drawParticle(Particle particle) { 85 | drawCircle(particle.getX(), particle.getY(), particle.size, new Color(255, 0, 0, 255).getRGB()); 86 | } 87 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/combat/crystalaura/module/CrystalAuraSettings.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.combat.crystalaura.module; 2 | 3 | import halq.misericordia.fun.executor.settings.SettingCategory; 4 | 5 | /** 6 | * @author Halq 7 | * @since 16/06/2023 at 19:30 8 | */ 9 | 10 | public class CrystalAuraSettings { 11 | 12 | public static void caSettings() { 13 | SettingCategory cat = CrystalAuraModule.INSTANCE.settings; 14 | CrystalAuraModule ca = CrystalAuraModule.INSTANCE; 15 | 16 | /** ------------------------------------ PLACE ---------------------------------------**/ 17 | ca.place.setVisible(cat.getValue().equalsIgnoreCase("Place")); 18 | ca.multiPlace.setVisible(cat.getValue().equalsIgnoreCase("Place")); 19 | ca.maxDmg.setVisible(cat.getValue().equalsIgnoreCase("Place")); 20 | ca.minDmg.setVisible(cat.getValue().equalsIgnoreCase("Place")); 21 | ca.minHealth.setVisible(cat.getValue().equalsIgnoreCase("Place")); 22 | ca.ppt.setVisible(cat.getValue().equalsIgnoreCase("Place")); 23 | ca.placeMode.setVisible(cat.getValue().equalsIgnoreCase("Place")); 24 | ca.placeRange.setVisible(cat.getValue().equalsIgnoreCase("Place")); 25 | ca.playerRange.setVisible(cat.getValue().equalsIgnoreCase("Place")); 26 | 27 | /** ------------------------------------ BREAK ---------------------------------------**/ 28 | ca.breakCrystal.setVisible(cat.getValue().equalsIgnoreCase("Break")); 29 | ca.attackPredict.setVisible(cat.getValue().equalsIgnoreCase("Break")); 30 | ca.apt.setVisible(cat.getValue().equalsIgnoreCase("Break")); 31 | ca.breakMode.setVisible(cat.getValue().equalsIgnoreCase("Break")); 32 | ca.breakRange.setVisible(cat.getValue().equalsIgnoreCase("Break")); 33 | 34 | /** ------------------------------------ AUTOSWITCH ---------------------------------**/ 35 | ca.autoSwitch.setVisible(cat.getValue().equalsIgnoreCase("AutoSwitch")); 36 | ca.autoSwitchMode.setVisible(cat.getValue().equalsIgnoreCase("AutoSwitch")); 37 | 38 | /** ------------------------------------ MULTITHREADING ------------------------------**/ 39 | ca.multiThread.setVisible(cat.getValue().equalsIgnoreCase("MultiThread")); 40 | ca.multiThreadDelay.setVisible(cat.getValue().equalsIgnoreCase("MultiThread")); 41 | ca.multiThreadValue.setVisible(cat.getValue().equalsIgnoreCase("MultiThread")); 42 | 43 | /** ------------------------------------ MISC ---------------------------------------**/ 44 | ca.pauseOnXp.setVisible(cat.getValue().equalsIgnoreCase("Misc")); 45 | ca.pauseOnGap.setVisible(cat.getValue().equalsIgnoreCase("Misc")); 46 | ca.handAnimations.setVisible(cat.getValue().equalsIgnoreCase("Misc")); 47 | 48 | /** ------------------------------------ ROTATIONS -------------------------------------**/ 49 | ca.rotations.setVisible(cat.getValue().equalsIgnoreCase("Rotations")); 50 | ca.rotateMode.setVisible(cat.getValue().equalsIgnoreCase("Rotations")); 51 | 52 | /** ------------------------------------ RENDER -------------------------------------**/ 53 | ca.render.setVisible(cat.getValue().equalsIgnoreCase("Render")); 54 | ca.red.setVisible(cat.getValue().equalsIgnoreCase("Render")); 55 | ca.green.setVisible(cat.getValue().equalsIgnoreCase("Render")); 56 | ca.blue.setVisible(cat.getValue().equalsIgnoreCase("Render")); 57 | ca.alpha.setVisible(cat.getValue().equalsIgnoreCase("Render")); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/ModeComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.settings.SettingMode; 4 | import halq.misericordia.fun.gui.igui.components.Component; 5 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 6 | import halq.misericordia.fun.utils.utils.RenderUtil; 7 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.Gui; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.awt.*; 13 | 14 | /** 15 | * @author Halq 16 | * @since 20/11/2022 at 13:03 17 | */ 18 | 19 | public class ModeComponent implements Component { 20 | 21 | private final Minecraft mc = Minecraft.getMinecraft(); 22 | public int x; 23 | public int y; 24 | int width; 25 | public int height; 26 | SettingMode setting; 27 | ModuleComponent parent; 28 | public boolean notVisible = false; 29 | 30 | public ModeComponent(ModuleComponent parent, int x, int y, SettingMode setting) { 31 | this.x = x; 32 | this.y = y; 33 | this.width = 88; 34 | this.height = 13; 35 | this.parent = parent; 36 | this.setting = setting; 37 | boolean notVisible = !setting.getVisible(); 38 | } 39 | 40 | @Override 41 | public void render(int mouseX, int mouseY) { 42 | if (setting.getVisible()) { 43 | height = 13; 44 | 45 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 46 | 47 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 48 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 49 | 50 | } 51 | 52 | GL11.glPushMatrix(); 53 | GL11.glScalef(0.5f, 0.5f, 0.5f); 54 | mc.fontRenderer.drawStringWithShadow(setting.getName(), (this.x + 2) * 2 + 5 + 2, (this.y + 2.5f) * 2 + 5, -1); 55 | mc.fontRenderer.drawStringWithShadow(setting.getValue(), (this.x + 2) * 2 + 50 + width - mc.fontRenderer.getStringWidth(setting.getValue()) - 2, (this.y + 2.5f) * 2 + 5, -1); 56 | GL11.glPopMatrix(); 57 | 58 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 59 | }else { 60 | height -= 13; 61 | y = 0; 62 | parent.buttonHeight -= 13; 63 | } 64 | } 65 | 66 | @Override 67 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 68 | if(setting.getVisible()) { 69 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 70 | String[] modes = setting.getModes().toArray(new String[0]); 71 | ; 72 | int index = 0; 73 | for (int i = 0; i < modes.length; i++) { 74 | if (modes[i].equalsIgnoreCase(setting.getValue())) { 75 | index = i; 76 | } 77 | } 78 | if (index == modes.length - 1) { 79 | setting.setValue(modes[0]); 80 | } else { 81 | setting.setValue(modes[index + 1]); 82 | } 83 | } 84 | } 85 | } 86 | 87 | @Override 88 | public void mouseReleased(int mouseX, int mouseY, int state) {} 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/miscellaneous/FakePlayer.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.miscellaneous; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | import halq.misericordia.fun.core.modulecore.Category; 5 | import halq.misericordia.fun.core.modulecore.Module; 6 | import halq.misericordia.fun.executor.settings.SettingBoolean; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import net.minecraft.client.entity.EntityOtherPlayerMP; 9 | import net.minecraft.world.GameType; 10 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 11 | import net.minecraftforge.fml.common.network.FMLNetworkEvent; 12 | 13 | import java.util.UUID; 14 | 15 | /** 16 | * @author Halq 17 | * @since 29/05/2023 at 18:49 18 | */ 19 | 20 | public class FakePlayer extends Module { 21 | 22 | SettingBoolean move = create("Move (dev)", false); //dev feature 23 | public FakePlayer() { 24 | super("FakePlayer", Category.WORLD); 25 | } 26 | 27 | private EntityOtherPlayerMP clonedPlayer; 28 | 29 | public void onEnable() { 30 | if (Minecraftable.mc.player == null || Minecraftable.mc.player.isDead) { 31 | onDisable(); 32 | return; 33 | } 34 | 35 | clonedPlayer = new EntityOtherPlayerMP(Minecraftable.mc.world, new GameProfile(UUID.fromString("48efc40f-56bf-42c3-aa24-28e0c053f325"), "AuroraOnTop")); 36 | clonedPlayer.copyLocationAndAnglesFrom(Minecraftable.mc.player); 37 | clonedPlayer.rotationYawHead = Minecraftable.mc.player.rotationYawHead; 38 | clonedPlayer.rotationYaw = Minecraftable.mc.player.rotationYaw; 39 | clonedPlayer.rotationPitch = Minecraftable.mc.player.rotationPitch; 40 | clonedPlayer.setGameType(GameType.SURVIVAL); 41 | clonedPlayer.setHealth(36); 42 | Minecraftable.mc.world.addEntityToWorld(-12345, clonedPlayer); 43 | 44 | 45 | if (move.getValue()) { 46 | clonedPlayer = new EntityOtherPlayerMP(Minecraftable.mc.world, new GameProfile(UUID.fromString("48efc40f-56bf-42c3-aa24-28e0c053f325"), "AuroraOnTop")); 47 | clonedPlayer.copyLocationAndAnglesFrom(Minecraftable.mc.player); 48 | clonedPlayer.rotationYawHead = Minecraftable.mc.player.rotationYawHead; 49 | clonedPlayer.rotationYaw = Minecraftable.mc.player.rotationYaw; 50 | clonedPlayer.rotationPitch = Minecraftable.mc.player.rotationPitch; 51 | clonedPlayer.setGameType(GameType.SURVIVAL); 52 | clonedPlayer.setHealth(36); 53 | Minecraftable.mc.world.addEntityToWorld(-12345, clonedPlayer); 54 | 55 | new Thread(() -> { 56 | while (true) { 57 | double speed = 0.1; 58 | 59 | double directionX = -Math.sin(Math.toRadians(clonedPlayer.rotationYaw)); 60 | double directionZ = Math.cos(Math.toRadians(clonedPlayer.rotationYaw)); 61 | 62 | clonedPlayer.setPosition(clonedPlayer.posX + directionX * speed, clonedPlayer.posY, clonedPlayer.posZ + directionZ * speed); 63 | 64 | try { 65 | Thread.sleep(50); 66 | } catch (InterruptedException e) { 67 | e.printStackTrace(); 68 | } 69 | } 70 | }).start(); 71 | } 72 | } 73 | 74 | public void onDisable() { 75 | if (Minecraftable.mc.world != null) { 76 | Minecraftable.mc.world.removeEntityFromWorld(-12345); 77 | } 78 | } 79 | 80 | @SubscribeEvent 81 | public void onClientDisconnect(final FMLNetworkEvent.ClientDisconnectionFromServerEvent event) { 82 | if (isEnabled()){ 83 | onDisable(); 84 | } 85 | } 86 | 87 | 88 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/shader/Shader.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.shader; 2 | 3 | import org.apache.commons.io.IOUtils; 4 | import org.lwjgl.opengl.*; 5 | 6 | import java.io.InputStream; 7 | import java.nio.charset.Charset; 8 | import java.util.*; 9 | 10 | public abstract class Shader { 11 | //pasted from ? 12 | public int program; 13 | public Map uniformsMap; 14 | 15 | public Shader(final String fragmentShader) { 16 | int vertexShaderID; 17 | int fragmentShaderID; 18 | try { 19 | final InputStream vertexStream = this.getClass().getResourceAsStream("/assets/misericordia/shaders/vertex.vert"); 20 | vertexShaderID = this.createShader(IOUtils.toString(vertexStream, Charset.defaultCharset()), 35633); 21 | IOUtils.closeQuietly(vertexStream); 22 | final InputStream fragmentStream = this.getClass().getResourceAsStream("/assets/misericordia/shaders/" + fragmentShader); 23 | fragmentShaderID = this.createShader(IOUtils.toString(fragmentStream, Charset.defaultCharset()), 35632); 24 | IOUtils.closeQuietly(fragmentStream); 25 | } 26 | catch (Exception e) { 27 | e.printStackTrace(); 28 | return; 29 | } 30 | if (vertexShaderID == 0 || fragmentShaderID == 0) { 31 | return; 32 | } 33 | this.program = ARBShaderObjects.glCreateProgramObjectARB(); 34 | if (this.program == 0) { 35 | return; 36 | } 37 | ARBShaderObjects.glAttachObjectARB(this.program, vertexShaderID); 38 | ARBShaderObjects.glAttachObjectARB(this.program, fragmentShaderID); 39 | ARBShaderObjects.glLinkProgramARB(this.program); 40 | ARBShaderObjects.glValidateProgramARB(this.program); 41 | } 42 | 43 | public void startShader() { 44 | GL11.glPushMatrix(); 45 | GL20.glUseProgram(this.program); 46 | if (this.uniformsMap == null) { 47 | this.uniformsMap = new HashMap<>(); 48 | this.setupUniforms(); 49 | } 50 | this.updateUniforms(); 51 | } 52 | 53 | public void stopShader() { 54 | GL20.glUseProgram(0); 55 | GL11.glPopMatrix(); 56 | } 57 | 58 | public void setupUniforms() {} 59 | public void updateUniforms() {} 60 | 61 | public int createShader(final String shaderSource, final int shaderType) { 62 | int shader = 0; 63 | try { 64 | shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType); 65 | if (shader == 0) return 0; 66 | ARBShaderObjects.glShaderSourceARB(shader, shaderSource); 67 | ARBShaderObjects.glCompileShaderARB(shader); 68 | if (ARBShaderObjects.glGetObjectParameteriARB(shader, 35713) == 0) throw new RuntimeException("Error creating shader: " + this.getLogInfo(shader)); 69 | return shader; 70 | } catch (Exception e) { 71 | ARBShaderObjects.glDeleteObjectARB(shader); 72 | throw e; 73 | } 74 | } 75 | 76 | public String getLogInfo(final int i) { 77 | return ARBShaderObjects.glGetInfoLogARB(i, ARBShaderObjects.glGetObjectParameteriARB(i, 35716)); 78 | } 79 | 80 | public void setUniform(final String uniformName, final int location) { 81 | this.uniformsMap.put(uniformName, location); 82 | } 83 | 84 | public void setupUniform(final String uniformName) { 85 | this.setUniform(uniformName, GL20.glGetUniformLocation(this.program, uniformName)); 86 | } 87 | 88 | public int getUniform(final String uniformName) { 89 | return this.uniformsMap.get(uniformName); 90 | } 91 | 92 | public int getProgramId() { 93 | return this.program; 94 | } 95 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/tracers/Tracers.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.tracers; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.events.RenderEvent; 6 | import halq.misericordia.fun.executor.settings.SettingDouble; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | import net.minecraft.util.math.Vec3d; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.util.stream.Collectors; 13 | 14 | /** 15 | * @author Halq 16 | * @since 05/06/2023 at 16:57 17 | */ 18 | 19 | public class Tracers extends Module { 20 | 21 | SettingDouble red = create("Red", 0.0, 0.0, 255.0); 22 | SettingDouble green = create("Green", 0.0, 0.0, 255.0); 23 | SettingDouble blue = create("Blue", 0.0, 0.0, 255.0); 24 | SettingDouble alpha = create("Alpha", 0.0, 0.0, 255.0); 25 | SettingDouble width = create("Width", 0.0, 0.0, 10.0); 26 | SettingDouble range = create("Range", 0.0, 0.0, 100.0); 27 | public SettingDouble minSafeAreaX = create("MinSafeAreaX", 0.0, 0.0, 1.0); 28 | public SettingDouble maxSafeAreaX = create("MaxSafeAreaX", 1.0, 0.0, 1.0); 29 | public SettingDouble minSafeAreaY = create("MinSafeAreaY", 0.0, 0.0, 1.0); 30 | public SettingDouble maxSafeAreaY = create("MaxSafeAreaY", 1.0, 0.0, 1.0); 31 | 32 | 33 | public static Tracers INSTANCE; 34 | 35 | public Tracers() { 36 | super("Tracers", Category.RENDER); 37 | INSTANCE = this; 38 | } 39 | 40 | @Override 41 | public void onRender3D(RenderEvent event) { 42 | GL11.glPushMatrix(); 43 | 44 | for (EntityPlayer player : getPlayers()) { 45 | double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * Minecraftable.mc.getRenderPartialTicks() - Minecraftable.mc.getRenderManager().viewerPosX; 46 | double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * Minecraftable.mc.getRenderPartialTicks() - Minecraftable.mc.getRenderManager().viewerPosY; 47 | double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * Minecraftable.mc.getRenderPartialTicks() - Minecraftable.mc.getRenderManager().viewerPosZ; 48 | double up = player.height; 49 | 50 | drawLine(posX, posY + player.getEyeHeight(), posZ, up, red.getValue().floatValue() / 255.0f, green.getValue().floatValue() / 255.0f, blue.getValue().floatValue() / 255.0f, alpha.getValue().floatValue() / 255.0f); 51 | } 52 | 53 | GL11.glPopMatrix(); 54 | } 55 | 56 | private Iterable getPlayers() { 57 | return Minecraftable.mc.world.loadedEntityList.stream() 58 | .filter(entity -> entity instanceof EntityPlayer && entity != Minecraftable.mc.player) 59 | .filter(entity -> Minecraftable.mc.player.getDistanceSq(entity) <= range.getValue() * range.getValue()) 60 | .map(entity -> (EntityPlayer) entity) 61 | .collect(Collectors.toList()); 62 | } 63 | 64 | private void drawLine(double posX, double posY, double posZ, double up, float red, float green, float blue, float opacity) { 65 | double pitch = Math.toRadians(Minecraftable.mc.player.rotationPitch); 66 | double yaw = Math.toRadians(Minecraftable.mc.player.rotationYaw); 67 | 68 | Vec3d eyes = new Vec3d(0.0, 0.0, 1.0).rotatePitch(-(float) pitch).rotateYaw(-(float) yaw); 69 | 70 | GL11.glLineWidth(width.getValue().floatValue()); 71 | 72 | TracersRender.drawLineFromPosToPos(eyes.x, eyes.y + Minecraftable.mc.player.getEyeHeight(), eyes.z, posX, posY, posZ, up, red, green, blue, opacity, width.getValue().floatValue()); 73 | } 74 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/chams/crystalchams/CrystalChamsModule.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render.chams.crystalchams; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.executor.settings.SettingDouble; 6 | import halq.misericordia.fun.executor.settings.SettingInteger; 7 | import halq.misericordia.fun.executor.settings.SettingMode; 8 | import halq.misericordia.fun.managers.shader.Flow; 9 | import halq.misericordia.fun.managers.shader.FramebufferShader; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.client.renderer.GlStateManager; 12 | import net.minecraft.entity.Entity; 13 | import net.minecraft.entity.item.EntityEnderCrystal; 14 | import net.minecraft.entity.item.EntityEnderPearl; 15 | import net.minecraft.entity.item.EntityItem; 16 | import net.minecraft.entity.monster.EntityMob; 17 | import net.minecraft.entity.monster.EntitySlime; 18 | import net.minecraft.entity.passive.EntityAnimal; 19 | import net.minecraft.entity.player.EntityPlayer; 20 | import net.minecraft.util.math.Vec3d; 21 | import net.minecraftforge.client.event.RenderWorldLastEvent; 22 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 23 | 24 | import java.util.Arrays; 25 | import java.util.Objects; 26 | 27 | /** 28 | * @author Halq 29 | * @since 25/06/2023 at 18:23 30 | */ 31 | 32 | public class CrystalChamsModule extends Module { 33 | 34 | public SettingDouble scale = create("Scale", 1.0, 0.1, 3.0); 35 | public SettingInteger speed = create("Speed", 3, 1, 50); 36 | public SettingDouble bounce = create("Bounce", 1.0, 0.1, 10); 37 | public SettingMode mode = create("Mode", "Shader", Arrays.asList("Shader", "Solid", "Wire")); 38 | 39 | public static CrystalChamsModule INSTANCE; 40 | public CrystalChamsModule() { 41 | super("CrystalChams", Category.RENDER); 42 | INSTANCE = this; 43 | } 44 | 45 | @SubscribeEvent 46 | public void onRender3D(RenderWorldLastEvent event) { 47 | FramebufferShader framebufferShader = Flow.Flow_Shader; 48 | GlStateManager.matrixMode(5889); 49 | GlStateManager.pushMatrix(); 50 | GlStateManager.matrixMode(5888); 51 | GlStateManager.pushMatrix(); 52 | framebufferShader.startDraw(event.getPartialTicks()); 53 | for (Entity entity : mc.world.loadedEntityList) { 54 | if ( entity == mc.getRenderViewEntity()) continue; 55 | if (entity instanceof EntityEnderCrystal) { 56 | Vec3d vector = getInterpolatedRenderPos(entity, event.getPartialTicks()); 57 | Objects.requireNonNull(mc.getRenderManager().getEntityRenderObject(entity)).doRender(entity, vector.x, vector.y, vector.z, entity.rotationYaw, event.getPartialTicks()); 58 | } 59 | } 60 | framebufferShader.stopDraw(); 61 | GlStateManager.color(1f, 1f, 1f); 62 | GlStateManager.matrixMode(5889); 63 | GlStateManager.popMatrix(); 64 | GlStateManager.matrixMode(5888); 65 | GlStateManager.popMatrix(); 66 | } 67 | 68 | public static Vec3d getInterpolatedRenderPos(final Entity entity, final float ticks) { 69 | return interpolateEntity(entity, ticks).subtract(Minecraft.getMinecraft().getRenderManager().viewerPosX, Minecraft.getMinecraft().getRenderManager().viewerPosY, Minecraft.getMinecraft().getRenderManager().viewerPosZ); 70 | } 71 | 72 | public static Vec3d interpolateEntity(Entity entity, float time) { 73 | return new Vec3d(entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * time, 74 | entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * time, 75 | entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * time); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/CategorySettingComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.settings.SettingCategory; 4 | import halq.misericordia.fun.gui.igui.components.Component; 5 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 6 | import halq.misericordia.fun.utils.utils.RenderUtil; 7 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.Gui; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.awt.*; 13 | 14 | /** 15 | * @author Halq 16 | * @since 16/06/2023 at 13:03 17 | */ 18 | 19 | public class CategorySettingComponent implements Component { 20 | 21 | private final Minecraft mc = Minecraft.getMinecraft(); 22 | public int x; 23 | public int y; 24 | int width; 25 | public int height; 26 | SettingCategory setting; 27 | ModuleComponent parent; 28 | public boolean notVisible = false; 29 | 30 | public CategorySettingComponent(ModuleComponent parent, int x, int y, SettingCategory setting) { 31 | this.x = x; 32 | this.y = y; 33 | this.width = 88; 34 | this.height = 13; 35 | this.parent = parent; 36 | this.setting = setting; 37 | boolean notVisible = !setting.getVisible(); 38 | } 39 | 40 | @Override 41 | public void render(int mouseX, int mouseY) { 42 | if (setting.getVisible()) { 43 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 44 | 45 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 46 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 47 | 48 | } 49 | 50 | GL11.glPushMatrix(); 51 | GL11.glScalef(0.5f, 0.5f, 0.5f); 52 | int fontWidth = mc.fontRenderer.getStringWidth(setting.getValue()); 53 | mc.fontRenderer.drawString(setting.getValue(), (x + 2) * 2 + (width * 2 - fontWidth) / 2, (y + 2) * 2 + 2, -1); 54 | GL11.glPopMatrix(); 55 | 56 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 57 | RenderUtil.drawLine(x + 14, y + height - 4, x + width - 12, y + height - 4, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 58 | }else { 59 | height -= 13; 60 | y = 0; 61 | 62 | } 63 | } 64 | 65 | @Override 66 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 67 | if(setting.getVisible()) { 68 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 69 | String[] modes = setting.getModes().toArray(new String[0]); 70 | ; 71 | int index = 0; 72 | for (int i = 0; i < modes.length; i++) { 73 | if (modes[i].equalsIgnoreCase(setting.getValue())) { 74 | index = i; 75 | } 76 | } 77 | if (index == modes.length - 1) { 78 | setting.setValue(modes[0]); 79 | } else { 80 | setting.setValue(modes[index + 1]); 81 | } 82 | } 83 | } 84 | } 85 | 86 | @Override 87 | public void mouseReleased(int mouseX, int mouseY, int state) {} 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/executor/modules/render/BlockHighlight.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.executor.modules.render; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.core.modulecore.Module; 5 | import halq.misericordia.fun.events.RenderEvent; 6 | import halq.misericordia.fun.executor.settings.SettingBoolean; 7 | import halq.misericordia.fun.executor.settings.SettingDouble; 8 | import halq.misericordia.fun.executor.settings.SettingInteger; 9 | import halq.misericordia.fun.utils.utils.RenderUtil; 10 | import net.minecraft.util.math.AxisAlignedBB; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.util.math.RayTraceResult; 13 | 14 | import java.awt.*; 15 | 16 | /** 17 | * @author Halq 18 | * @since 29/06/2023 at 21:44 19 | */ 20 | 21 | public class BlockHighlight extends Module { 22 | 23 | SettingBoolean lerp = create("Lerp", true); 24 | SettingInteger red = create("Red", 0, 0, 255); 25 | SettingInteger green = create("Green", 0, 0, 255); 26 | SettingInteger blue = create("Blue", 0, 0, 255); 27 | SettingInteger alpha = create("Alpha", 0, 0, 255); 28 | SettingDouble lineWidth = create("LineWidth", 1.5, 0, 10); 29 | 30 | private BlockPos previousPos; 31 | private BlockPos currentPos; 32 | private float renderX; 33 | private float renderY; 34 | private float renderZ; 35 | 36 | public BlockHighlight() { 37 | super("BlockHighlight", Category.RENDER); 38 | } 39 | 40 | @Override 41 | public void onRender3D(RenderEvent event) { 42 | RayTraceResult ray = mc.objectMouseOver; 43 | final AxisAlignedBB bb; 44 | if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK) { 45 | BlockPos blockpos = ray.getBlockPos(); 46 | 47 | if (lerp.getValue()) { 48 | if (currentPos == null || !blockpos.equals(currentPos)) { 49 | previousPos = currentPos; 50 | currentPos = blockpos; 51 | } 52 | 53 | if (previousPos == null) { 54 | renderX = blockpos.getX(); 55 | renderY = blockpos.getY(); 56 | renderZ = blockpos.getZ(); 57 | } else { 58 | float lerpAmount = 0.1f; 59 | renderX = lerp(renderX, blockpos.getX(), lerpAmount); 60 | renderY = lerp(renderY, blockpos.getY(), lerpAmount); 61 | renderZ = lerp(renderZ, blockpos.getZ(), lerpAmount); 62 | } 63 | 64 | bb = new AxisAlignedBB(renderX - mc.getRenderManager().viewerPosX, renderY - mc.getRenderManager().viewerPosY, renderZ - mc.getRenderManager().viewerPosZ, renderX + 1 - mc.getRenderManager().viewerPosX, renderY + 1 - mc.getRenderManager().viewerPosY, renderZ + 1 - mc.getRenderManager().viewerPosZ); 65 | } else { 66 | bb = new AxisAlignedBB(blockpos.getX() - mc.getRenderManager().viewerPosX, blockpos.getY() - mc.getRenderManager().viewerPosY, blockpos.getZ() - mc.getRenderManager().viewerPosZ, blockpos.getX() + 1 - mc.getRenderManager().viewerPosX, blockpos.getY() + 1 - mc.getRenderManager().viewerPosY, blockpos.getZ() + 1 - mc.getRenderManager().viewerPosZ); 67 | } 68 | 69 | if (RenderUtil.isInViewFrustrum(new AxisAlignedBB(bb.minX + mc.getRenderManager().viewerPosX, bb.minY + mc.getRenderManager().viewerPosY, bb.minZ + mc.getRenderManager().viewerPosZ, bb.maxX + mc.getRenderManager().viewerPosX, bb.maxY + mc.getRenderManager().viewerPosY, bb.maxZ + mc.getRenderManager().viewerPosZ))) { 70 | RenderUtil.drawEspOutline(bb, red.getValue(), green.getValue(), blue.getValue(), alpha.getValue(), lineWidth.getValue().floatValue()); 71 | } 72 | } 73 | } 74 | 75 | private static float lerp(float start, float end, float amount) { 76 | return start + amount * (end - start); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/BooleanComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.settings.SettingBoolean; 4 | import halq.misericordia.fun.gui.igui.components.Component; 5 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 6 | import halq.misericordia.fun.utils.utils.RenderUtil; 7 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.Gui; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.awt.*; 13 | 14 | /** 15 | * @author Halq 16 | * @since 19/11/2022 at 20:49 17 | */ 18 | 19 | public class BooleanComponent implements Component { 20 | 21 | private final Minecraft mc = Minecraft.getMinecraft(); 22 | public int x; 23 | public int y; 24 | public int height; 25 | int width; 26 | SettingBoolean setting; 27 | ModuleComponent moduleComponent; 28 | public boolean notVisible = false; 29 | 30 | public BooleanComponent(ModuleComponent moduleComponent, int x, int y, SettingBoolean setting) { 31 | this.moduleComponent = moduleComponent; 32 | this.x = x; 33 | this.y = y; 34 | this.setting = setting; 35 | width = 88; 36 | height = 13; 37 | boolean notVisible = !setting.getVisible(); 38 | } 39 | 40 | @Override 41 | public void render(int mouseX, int mouseY) { 42 | if (setting.getVisible()) { 43 | height = 13; 44 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 45 | Gui.drawRect(x + 4, y + 2, x + height + 2, y + height - 2, new Color(13, 13, 23, 182).brighter().getRGB()); 46 | 47 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 48 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 49 | } 50 | 51 | if (setting instanceof SettingBoolean && ((SettingBoolean) setting).getValue()) { 52 | Gui.drawRect(x + 4, y + 2, x + height + 2, y + height - 2, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 53 | if(mouseX >= x + 4 && mouseX <= x + height + 2 && mouseY >= y + 2 && mouseY <= y + height - 2) { 54 | Gui.drawRect(x + 4, y + 2, x + height + 2, y + height - 2, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).brighter().getRGB()); 55 | } 56 | } 57 | 58 | GL11.glPushMatrix(); 59 | GL11.glScalef(0.5f, 0.5f, 0.5f); 60 | mc.fontRenderer.drawStringWithShadow(setting.getName(), (this.x + 20) * 2 + 5, (this.y + 2.5f) * 2 + 5, -1); 61 | GL11.glPopMatrix(); 62 | 63 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 64 | } else { 65 | height -= 13; 66 | y = 0; 67 | moduleComponent.buttonHeight -= 13; 68 | } 69 | } 70 | 71 | @Override 72 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 73 | if (setting.getVisible()) { 74 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 75 | setting.setValue(!((SettingBoolean) setting).getValue()); 76 | } 77 | } 78 | } 79 | 80 | @Override 81 | public void mouseReleased(int mouseX, int mouseY, int state) { 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/shader/FramebufferShader.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.shader; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.client.gui.ScaledResolution; 5 | import net.minecraft.client.renderer.*; 6 | import net.minecraft.client.shader.Framebuffer; 7 | import org.lwjgl.opengl.*; 8 | 9 | import static org.lwjgl.opengl.GL11.*; 10 | 11 | public abstract class FramebufferShader extends Shader { 12 | public Minecraft mc; 13 | public static Framebuffer framebuffer; 14 | public boolean entityShadows; 15 | public int animationSpeed; 16 | 17 | public FramebufferShader(final String fragmentShader) { 18 | super(fragmentShader); 19 | this.mc = Minecraft.getMinecraft(); 20 | } 21 | 22 | public void startDraw(final float partialTicks) { 23 | GlStateManager.enableAlpha(); 24 | GlStateManager.pushMatrix(); 25 | GlStateManager.pushAttrib(); 26 | (FramebufferShader.framebuffer = setupFrameBuffer(FramebufferShader.framebuffer)).framebufferClear(); 27 | FramebufferShader.framebuffer.bindFramebuffer(true); 28 | entityShadows = mc.gameSettings.entityShadows; 29 | mc.gameSettings.entityShadows = false; 30 | mc.entityRenderer.setupCameraTransform(partialTicks, 0); 31 | } 32 | 33 | public void stopDraw() { 34 | mc.gameSettings.entityShadows = this.entityShadows; 35 | GL11.glEnable(GL_BLEND); 36 | GL11.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 37 | mc.getFramebuffer().bindFramebuffer(true); 38 | mc.entityRenderer.disableLightmap(); 39 | RenderHelper.disableStandardItemLighting(); 40 | startShader(); 41 | mc.entityRenderer.setupOverlayRendering(); 42 | drawFramebuffer(FramebufferShader.framebuffer); 43 | stopShader(); 44 | mc.entityRenderer.disableLightmap(); 45 | GlStateManager.popMatrix(); 46 | GlStateManager.popAttrib(); 47 | } 48 | 49 | public Framebuffer setupFrameBuffer(Framebuffer frameBuffer) { 50 | if (frameBuffer != null) frameBuffer.deleteFramebuffer(); 51 | frameBuffer = new Framebuffer(this.mc.displayWidth, this.mc.displayHeight, true); 52 | return frameBuffer; 53 | } 54 | 55 | public void drawFramebuffer(final Framebuffer framebuffer) { 56 | final ScaledResolution scaledResolution = new ScaledResolution(this.mc); 57 | GL11.glBindTexture(3553, framebuffer.framebufferTexture); 58 | GL11.glBegin(7); 59 | GL11.glTexCoord2d(Double.longBitsToDouble(Double.doubleToLongBits(1.7921236082576344E308) ^ 0x7FEFE69EB44D9FE1L), Double.longBitsToDouble(Double.doubleToLongBits(4.899133169559449) ^ 0x7FE398B65D9806D1L)); 60 | GL11.glVertex2d(Double.longBitsToDouble(Double.doubleToLongBits(3.7307361562967813E307) ^ 0x7FCA9050299687CBL), Double.longBitsToDouble(Double.doubleToLongBits(7.56781900945177E307) ^ 0x7FDAF13C89C9BE29L)); 61 | GL11.glTexCoord2d(Double.longBitsToDouble(Double.doubleToLongBits(1.0409447193540338E308) ^ 0x7FE28788CB57BFECL), Double.longBitsToDouble(Double.doubleToLongBits(4.140164300258766E307) ^ 0x7FCD7A9C5BA7C45BL)); 62 | GL11.glVertex2d(Double.longBitsToDouble(Double.doubleToLongBits(1.3989301333159067E308) ^ 0x7FE8E6DB3F70C542L), scaledResolution.getScaledHeight()); 63 | GL11.glTexCoord2d(Double.longBitsToDouble(Double.doubleToLongBits(52.314008345000495) ^ 0x7FBA28316CEA395FL), Double.longBitsToDouble(Double.doubleToLongBits(1.3534831910786353E308) ^ 0x7FE817C1C68E7C69L)); 64 | GL11.glVertex2d(scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight()); 65 | GL11.glTexCoord2d(Double.longBitsToDouble(Double.doubleToLongBits(4.557588341026122) ^ 0x7FE23AF870255A34L), Double.longBitsToDouble(Double.doubleToLongBits(23.337335758793085) ^ 0x7FC7565BA2E3C9A3L)); 66 | GL11.glVertex2d(scaledResolution.getScaledWidth(), Double.longBitsToDouble(Double.doubleToLongBits(1.5123382114342209E308) ^ 0x7FEAEBA6CA1CFB74L)); 67 | GL11.glEnd(); 68 | GL20.glUseProgram(0); 69 | } 70 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/particles/Particle.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.particles; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.client.gui.ScaledResolution; 5 | import net.minecraftforge.fml.relauncher.Side; 6 | import net.minecraftforge.fml.relauncher.SideOnly; 7 | 8 | import java.util.Random; 9 | 10 | import static org.lwjgl.opengl.GL11.*; 11 | 12 | /** 13 | * @author Halq 14 | * @since 30/07/2023 at 23:32 15 | */ 16 | 17 | public class Particle { 18 | 19 | public float x; 20 | public float y; 21 | public final float size; 22 | private final float ySpeed; 23 | private final float xSpeed; 24 | 25 | Particle(int x, int y) { 26 | this.x = x; 27 | this.y = y; 28 | this.size = genRandom(); 29 | this.ySpeed = 0.0001f; 30 | this.xSpeed = 0.0001f; 31 | } 32 | 33 | void connect(float x, float y) { 34 | connectPoints(getX(), getY(), x, y); 35 | } 36 | 37 | void interpolation() { 38 | for (int n = 0; n <= 64; ++n) { 39 | final float f = n / 64.0f; 40 | final float p1 = lint1(f); 41 | final float p2 = lint2(f); 42 | 43 | if (p1 != p2) { 44 | y -= f; 45 | x -= f; 46 | } 47 | } 48 | } 49 | 50 | void fall() { 51 | final Minecraft mc = Minecraft.getMinecraft(); 52 | final ScaledResolution scaledResolution = new ScaledResolution(mc); 53 | y = (y + ySpeed); 54 | x = (x + xSpeed); 55 | 56 | if (y > mc.displayHeight) 57 | y = 1; 58 | 59 | if (x > mc.displayWidth) 60 | x = 1; 61 | 62 | if (x < 1) 63 | x = scaledResolution.getScaledWidth(); 64 | 65 | if (y < 1) 66 | y = scaledResolution.getScaledHeight(); 67 | } 68 | 69 | private float genRandom() { 70 | return (float) (0.3f + Math.random() * (0.6f - 0.3f + 1.0F)); 71 | } 72 | 73 | private float lint1(float f) { 74 | return ((float) 1.02 * (1.0f - f)) + (f); 75 | } 76 | 77 | private float lint2(float f) { 78 | return (float) 1.02 + f * ((float) 1.0 - (float) 1.02); 79 | } 80 | 81 | public float getX() { 82 | return x; 83 | } 84 | 85 | public float getY() { 86 | return y; 87 | } 88 | 89 | private static void connectPoints(float xOne, float yOne, float xTwo, float yTwo) { 90 | glPushMatrix(); 91 | glEnable(GL_LINE_SMOOTH); 92 | glColor4f(255, 0, 0, 255); 93 | glDisable(GL_TEXTURE_2D); 94 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 95 | glEnable(GL_BLEND); 96 | glLineWidth(0.5F); 97 | glBegin(GL_LINES); 98 | glVertex2f(xOne, yOne); 99 | glVertex2f(xTwo, yTwo); 100 | glEnd(); 101 | glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 102 | glDisable(GL_LINE_SMOOTH); 103 | glEnable(GL_TEXTURE_2D); 104 | glPopMatrix(); 105 | } 106 | 107 | public static void drawCircle(float x, float y, float radius, int color) { 108 | float alpha = (color >> 24 & 0xFF) / 255.0F; 109 | float red = (color >> 16 & 0xFF) / 255.0F; 110 | float green = (color >> 8 & 0xFF) / 255.0F; 111 | float blue = (color & 0xFF) / 255.0F; 112 | 113 | glColor4f(red, green, blue, alpha); 114 | glEnable(GL_BLEND); 115 | glDisable(GL_TEXTURE_2D); 116 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 117 | glEnable(GL_LINE_SMOOTH); 118 | glPushMatrix(); 119 | glLineWidth(1F); 120 | glBegin(GL_POLYGON); 121 | for (int i = 0; i <= 360; i++) 122 | glVertex2d(x + Math.sin(i * Math.PI / 180.0D) * radius, y + Math.cos(i * Math.PI / 180.0D) * radius); 123 | glEnd(); 124 | glPopMatrix(); 125 | glEnable(GL_TEXTURE_2D); 126 | glDisable(GL_LINE_SMOOTH); 127 | glColor4f(1F, 1F, 1F, 1F); 128 | } 129 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/ClickGuiScreen.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui; 2 | 3 | import halq.misericordia.fun.core.modulecore.Category; 4 | import halq.misericordia.fun.gui.guibars.ClickBar; 5 | import halq.misericordia.fun.gui.guibars.RenderBar; 6 | import halq.misericordia.fun.gui.igui.components.category.CategoryComponent; 7 | import halq.misericordia.fun.gui.igui.components.modoptionstab.ModOptionsTab; 8 | import halq.misericordia.fun.gui.igui.components.particles.Particles; 9 | import net.minecraft.client.gui.GuiScreen; 10 | import org.lwjgl.input.Mouse; 11 | 12 | import java.io.IOException; 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * @author Halq 17 | * @since 19/11/2022 at 14:16 18 | */ 19 | 20 | public class ClickGuiScreen extends GuiScreen { 21 | 22 | public static ClickGuiScreen INSTANCE; 23 | private static final Particles particles = new Particles(240); 24 | 25 | ArrayList components; 26 | int screenWidth = width; 27 | int screenHeight = height; 28 | 29 | public ClickGuiScreen() { 30 | components = new ArrayList<>(); 31 | INSTANCE = this; 32 | 33 | int x = 5; 34 | int y = 10; 35 | for (Category c : Category.values()) { 36 | CategoryComponent component = new CategoryComponent(c, x, y); 37 | components.add(component); 38 | component.closedX = x; 39 | component.closedY = y; 40 | component.openX = x; 41 | component.openY = y; 42 | x += component.width + 3; 43 | } 44 | } 45 | 46 | @Override 47 | public void drawScreen(int mouseX, int mouseY, float partialTicks) { 48 | super.drawDefaultBackground(); 49 | for (CategoryComponent c : components) { 50 | c.render(mouseX, mouseY); 51 | } 52 | RenderBar.render(mouseX, mouseY, 1); 53 | super.drawScreen(mouseX, mouseY, partialTicks); 54 | } 55 | 56 | @Override 57 | protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException { 58 | for (CategoryComponent c : components) { 59 | c.mouseClicked(mouseX, mouseY, mouseButton); 60 | } 61 | ClickBar.mouseClicked(mouseX, mouseY, mouseButton); 62 | super.mouseClicked(mouseX, mouseY, mouseButton); 63 | } 64 | 65 | @Override 66 | protected void mouseReleased(int mouseX, int mouseY, int state) { 67 | for (CategoryComponent c : components) { 68 | c.mouseReleased(mouseX, mouseY, state); 69 | } 70 | super.mouseReleased(mouseX, mouseY, state); 71 | } 72 | 73 | public void updateScreen() { 74 | int scrollWheel = Mouse.getDWheel(); 75 | //from gui of aurora (made for me) 76 | for (CategoryComponent cF : components) { 77 | if (scrollWheel < 0) { 78 | cF.y = cF.y - 10; 79 | } else if (scrollWheel > 0) { 80 | cF.y = cF.y + 10; 81 | } 82 | } 83 | } 84 | 85 | @Override 86 | public void initGui() { 87 | for (CategoryComponent c : components) { 88 | c.x = c.closedX; 89 | c.y = c.closedY; 90 | c.renderY = 100000; 91 | } 92 | } 93 | 94 | @Override 95 | public void onGuiClosed() { 96 | for (CategoryComponent c : components) { 97 | c.closedX = c.x; 98 | c.closedY = c.y; 99 | c.renderY = 0; 100 | } 101 | } 102 | 103 | @Override 104 | public boolean doesGuiPauseGame() { 105 | return false; 106 | } 107 | 108 | @Override 109 | protected void keyTyped(char typedChar, int keyCode) throws IOException { 110 | for (CategoryComponent c : components) { 111 | if(CategoryComponent.modOptionsOpen){ 112 | ModOptionsTab.INSTANCE.keyTyped(typedChar, keyCode); 113 | } else { 114 | c.keyTyped(typedChar, keyCode); 115 | } 116 | } 117 | super.keyTyped(typedChar, keyCode); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/mixin/mixins/MixinRenderEnderCrystal.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.mixin.mixins; 2 | 3 | import halq.misericordia.fun.executor.modules.render.chams.crystalchams.CrystalChamsModule; 4 | import halq.misericordia.fun.managers.module.ModuleManager; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.model.ModelBase; 7 | import net.minecraft.client.renderer.GlStateManager; 8 | import net.minecraft.client.renderer.entity.RenderEnderCrystal; 9 | import net.minecraft.entity.Entity; 10 | import net.minecraft.entity.item.EntityEnderCrystal; 11 | import net.minecraft.util.math.MathHelper; 12 | import org.lwjgl.opengl.GL11; 13 | import org.spongepowered.asm.mixin.Final; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | import org.spongepowered.asm.mixin.injection.At; 17 | import org.spongepowered.asm.mixin.injection.Inject; 18 | import org.spongepowered.asm.mixin.injection.Redirect; 19 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 20 | 21 | import static org.lwjgl.opengl.GL11.GL_LIGHTING; 22 | 23 | /** 24 | * @author Halq 25 | * @since 25/06/2023 at 18:26 26 | */ 27 | 28 | @Mixin(value={RenderEnderCrystal.class}) 29 | public abstract class MixinRenderEnderCrystal { 30 | @Shadow 31 | public ModelBase modelEnderCrystal; 32 | @Shadow 33 | public ModelBase modelEnderCrystalNoBase; 34 | 35 | @Final 36 | 37 | @Shadow 38 | public abstract void doRender(EntityEnderCrystal var1, double var2, double var4, double var6, float var8, float var9); 39 | 40 | @Redirect(method = {"doRender(Lnet/minecraft/entity/item/EntityEnderCrystal;DDDFF)V"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBase;render(Lnet/minecraft/entity/Entity;FFFFFF)V")) 41 | private void render1(ModelBase var1, Entity var2, float var3, float var4, float var5, float var6, float var7, float var8) { 42 | if (!ModuleManager.INSTANCE.getModule(CrystalChamsModule.class).isEnabled()) { 43 | var1.render(var2, var3, var4, var5, var6, var7, var8); 44 | } 45 | } 46 | 47 | @Redirect(method = {"doRender(Lnet/minecraft/entity/item/EntityEnderCrystal;DDDFF)V"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBase;render(Lnet/minecraft/entity/Entity;FFFFFF)V", ordinal = 1)) 48 | private void render2(ModelBase var1, Entity var2, float var3, float var4, float var5, float var6, float var7, float var8) { 49 | if (!ModuleManager.INSTANCE.getModule(CrystalChamsModule.class).isEnabled()) { 50 | var1.render(var2, var3, var4, var5, var6, var7, var8); 51 | } 52 | } 53 | 54 | @Inject(method = {"doRender(Lnet/minecraft/entity/item/EntityEnderCrystal;DDDFF)V"}, at = {@At(value = "RETURN")}, cancellable = true) 55 | public void IdoRender(EntityEnderCrystal var1, double var2, double var4, double var6, float var8, float var9, CallbackInfo var10) { 56 | if (ModuleManager.INSTANCE.getModule(CrystalChamsModule.class).isEnabled()) { 57 | Minecraft mc = Minecraft.getMinecraft(); 58 | GL11.glPushMatrix(); 59 | GlStateManager.translate((double) var2, (double) var4, (double) var6); 60 | 61 | float var13 = (float) var1.innerRotation + var9; 62 | 63 | float var14 = MathHelper.sin((float) (var13 * 0.2f)) / 2.0f + 0.5f; 64 | 65 | var14 += var14 * var14; 66 | 67 | GL11.glScaled(CrystalChamsModule.INSTANCE.scale.getValue(), CrystalChamsModule.INSTANCE.scale.getValue(), CrystalChamsModule.INSTANCE.scale.getValue()); 68 | 69 | if (var1.shouldShowBottom()) { 70 | this.modelEnderCrystal.render((Entity) var1, 0.0f, var13 * CrystalChamsModule.INSTANCE.speed.getValue().floatValue(), var14 * CrystalChamsModule.INSTANCE.bounce.getValue().floatValue(), 0.0f, 0.0f, 0.0625f); 71 | } else { 72 | this.modelEnderCrystalNoBase.render((Entity) var1, 0.0f, var13 * CrystalChamsModule.INSTANCE.speed.getValue().floatValue(), var14 * CrystalChamsModule.INSTANCE.bounce.getValue().floatValue(), 0.0f, 0.0f, 0.0625f); 73 | } 74 | 75 | GL11.glPopMatrix(); 76 | 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/managers/command/CommandManager.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.managers.command; 2 | 3 | import halq.misericordia.fun.core.commandcore.Command; 4 | import halq.misericordia.fun.executor.commands.*; 5 | import halq.misericordia.fun.utils.utils.MessageUtil; 6 | import halq.misericordia.fun.utils.Minecraftable; 7 | import net.minecraftforge.client.event.ClientChatEvent; 8 | import net.minecraftforge.common.MinecraftForge; 9 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 10 | 11 | import java.util.ArrayList; 12 | import java.util.LinkedList; 13 | import java.util.List; 14 | 15 | /** 16 | * @author accessmodifier364 17 | * @since 24-Nov-2021 18 | */ 19 | 20 | public class CommandManager implements Minecraftable { 21 | 22 | public static CommandManager INSTANCE; 23 | private final List commands = new ArrayList<>(); 24 | private String clientMessage = "Misericordia"; 25 | private String prefix = "~"; 26 | 27 | public CommandManager() { 28 | MinecraftForge.EVENT_BUS.register(this); 29 | commands.add(new Bind()); 30 | commands.add(new Toggle()); 31 | commands.add(new Save()); 32 | commands.add(new Help()); 33 | } 34 | 35 | public static String[] removeElement(String[] input, int indexToDelete) { 36 | LinkedList result = new LinkedList<>(); 37 | for (int i = 0; i < input.length; ++i) { 38 | if (i == indexToDelete) continue; 39 | result.add(input[i]); 40 | } 41 | return result.toArray(input); 42 | } 43 | 44 | private static String strip(String str, String key) { 45 | if (str.startsWith(key) && str.endsWith(key)) { 46 | return str.substring(key.length(), str.length() - key.length()); 47 | } 48 | return str; 49 | } 50 | 51 | /** 52 | * This is important asf, this detect every message sended by the player. 53 | * 54 | * @param event 55 | */ 56 | @SubscribeEvent 57 | public void onChat(ClientChatEvent event) { 58 | if (event.getMessage().startsWith(prefix)) { 59 | try { 60 | mc.ingameGUI.getChatGUI().addToSentMessages(event.getMessage()); 61 | if (event.getMessage().length() > 1) { 62 | CommandManager.INSTANCE.executeCommand(event.getMessage().substring(prefix.length() - 1)); 63 | } else { 64 | MessageUtil.sendMessage("Invalid command."); 65 | } 66 | } catch (Exception ignored) { 67 | } 68 | event.setCanceled(true); 69 | } 70 | } 71 | 72 | public void executeCommand(String command) { 73 | String[] parts = command.split(" (?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)"); 74 | String name = parts[0].substring(1); 75 | String[] args = CommandManager.removeElement(parts, 0); 76 | for (int i = 0; i < args.length; ++i) { 77 | if (args[i] == null) continue; 78 | args[i] = CommandManager.strip(args[i], "\""); 79 | } 80 | for (Command c : commands) { 81 | if (!c.getName().equalsIgnoreCase(name)) continue; 82 | c.execute(parts); 83 | return; 84 | } 85 | MessageUtil.sendMessage("Unknown command. try " + prefix + "help for a list of commands."); 86 | } 87 | 88 | public Command getCommandByName(String name) { 89 | for (Command command : commands) { 90 | if (!command.getName().equals(name)) continue; 91 | return command; 92 | } 93 | return null; 94 | } 95 | 96 | public List getCommands() { 97 | return commands; 98 | } 99 | 100 | public String getClientMessage() { 101 | return clientMessage; 102 | } 103 | 104 | public void setClientMessage(String clientMessage) { 105 | this.clientMessage = clientMessage; 106 | } 107 | 108 | public String getPrefix() { 109 | return prefix; 110 | } 111 | 112 | public void setPrefix(String prefix) { 113 | this.prefix = prefix; 114 | } 115 | 116 | } -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/utils/utils/MessageUtil.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.utils.utils; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import halq.misericordia.fun.gui.console.core.ConsoleAPI; 5 | import halq.misericordia.fun.managers.command.CommandManager; 6 | import halq.misericordia.fun.core.modulecore.Module; 7 | import halq.misericordia.fun.utils.Minecraftable; 8 | import net.minecraft.util.text.ITextComponent; 9 | import net.minecraft.util.text.Style; 10 | import net.minecraft.util.text.TextComponentBase; 11 | import net.minecraft.util.text.TextComponentString; 12 | import net.minecraft.util.text.event.HoverEvent; 13 | 14 | import java.util.regex.Matcher; 15 | import java.util.regex.Pattern; 16 | 17 | /** 18 | * @author accessmodifier364 19 | * @since 24-Nov-2021 20 | */ 21 | 22 | public class MessageUtil implements Minecraftable { 23 | 24 | private String name; 25 | private String[] commands; 26 | 27 | public static String getWatermark() { 28 | return "\u00a7+" + CommandManager.INSTANCE.getClientMessage(); 29 | } 30 | 31 | public static void toggleMessage(Module module) { 32 | if (module.getName().equals("ClickGui") || module.getName().equals("HUD")) return; 33 | 34 | if (module.isEnabled()) { 35 | sendOverwriteMessage("[" + ChatFormatting.DARK_RED + "Misericordia" + ChatFormatting.GRAY + "] " + ChatFormatting.GRAY + module.getName() + " toggled " + ChatFormatting.GREEN + "on" + ChatFormatting.GRAY + ".", 7183); 36 | } 37 | else{ 38 | sendOverwriteMessage("[" + ChatFormatting.DARK_RED + "Misericordia" + ChatFormatting.GRAY + "] " + ChatFormatting.GRAY + module.getName() + " toggled " + ChatFormatting.RED + "off" + ChatFormatting.GRAY + ".", 7183); 39 | } 40 | 41 | } 42 | 43 | public static void sendClientMessage(String message) { 44 | if (mc.player != null) { 45 | final ITextComponent itc = new TextComponentString(message).setStyle(new Style().setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString("Easter egg")))); 46 | mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(itc, 6937); 47 | } 48 | ConsoleAPI.log(message); 49 | } 50 | 51 | public static void sendMessage(String message) { 52 | sendSilentMessage("[" + ChatFormatting.DARK_RED + "Misericordia" + ChatFormatting.GRAY + "] " + ChatFormatting.RESET + ChatFormatting.GRAY + message); 53 | } 54 | 55 | public static void sendSilentMessage(String message) { 56 | if (mc.player == null) return; 57 | mc.player.sendMessage(new ChatMessage(message)); 58 | ConsoleAPI.log(message); 59 | } 60 | 61 | public static void sendOverwriteMessage(String message, int id) { 62 | TextComponentString component = new TextComponentString(message); 63 | mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(component, id); 64 | ConsoleAPI.log(message); 65 | } 66 | 67 | public static void sendRainbowMessage(String message) { 68 | StringBuilder stringBuilder = new StringBuilder(message); 69 | stringBuilder.insert(0, "\u00a7+"); 70 | mc.player.sendMessage(new ChatMessage(stringBuilder.toString())); 71 | } 72 | 73 | public String getName() { 74 | return name; 75 | } 76 | 77 | public String[] getCommands() { 78 | return commands; 79 | } 80 | 81 | public static class ChatMessage extends TextComponentBase { 82 | private final String text; 83 | 84 | public ChatMessage(String text) { 85 | Pattern pattern = Pattern.compile("&[0123456789abcdefrlosmk]"); 86 | Matcher matcher = pattern.matcher(text); 87 | StringBuffer stringBuffer = new StringBuffer(); 88 | while (matcher.find()) { 89 | String replacement = "\u00a7" + matcher.group().substring(1); 90 | matcher.appendReplacement(stringBuffer, replacement); 91 | } 92 | matcher.appendTail(stringBuffer); 93 | this.text = stringBuffer.toString(); 94 | } 95 | 96 | public String getUnformattedComponentText() { 97 | return text; 98 | } 99 | 100 | public ITextComponent createCopy() { 101 | return new ChatMessage(text); 102 | } 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/NumberIntComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 4 | import halq.misericordia.fun.executor.settings.SettingInteger; 5 | import halq.misericordia.fun.gui.igui.components.Component; 6 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 7 | import halq.misericordia.fun.utils.utils.RenderUtil; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.Gui; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.awt.*; 13 | import java.text.DecimalFormat; 14 | 15 | /** 16 | * @author Halq 17 | * @since 15/06/2023 at 19:31 18 | */ 19 | 20 | public class NumberIntComponent implements Component { 21 | 22 | private final Minecraft mc = Minecraft.getMinecraft(); 23 | public int x; 24 | public int y; 25 | public int height; 26 | int width; 27 | int sliderwidth = 0; 28 | SettingInteger setting; 29 | boolean dragging; 30 | ModuleComponent parent; 31 | public boolean notVisible = false; 32 | 33 | public NumberIntComponent(ModuleComponent parent, int x, int y, SettingInteger setting) { 34 | this.x = x; 35 | this.y = y; 36 | this.width = 88; 37 | this.height = 13; 38 | this.parent = parent; 39 | this.setting = setting; 40 | boolean notVisible = !setting.getVisible(); 41 | } 42 | 43 | private void updateSlider(int mouseX) { 44 | int diff = Math.min(width, Math.max(0, mouseX - x)); 45 | 46 | int min = setting.getMinValue(); 47 | int max = setting.getMaxValue(); 48 | 49 | sliderwidth = (setting.getValue() * width / max); 50 | 51 | if (dragging) { 52 | if (diff == 0) { 53 | setting.setValue(min); 54 | } else { 55 | setting.setValue(min + (max - min) * diff / width); 56 | } 57 | } 58 | } 59 | 60 | @Override 61 | public void render(int mouseX, int mouseY) { 62 | if (setting.getVisible()) { 63 | height = 13; 64 | 65 | updateSlider(mouseX); 66 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 67 | 68 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 69 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 70 | } 71 | 72 | GL11.glPushMatrix(); 73 | GL11.glScaled(0.5, 0.5, 0.5); 74 | Gui.drawRect((this.x + 2) * 2 + 20, (this.y + 2) * 2 + 5, (this.x + 2) * 2 + 21 + sliderwidth, (this.y + 2) * 2 + 5 + height, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 75 | DecimalFormat df = new DecimalFormat("#.#"); 76 | String displayval = df.format(setting.getValue()); 77 | mc.fontRenderer.drawStringWithShadow(displayval + "", (this.x + 2) * 2 + 120, (this.y + 3) * 2 + 5, new Color(255, 255, 255, 255).getRGB()); 78 | mc.fontRenderer.drawStringWithShadow(setting.getName(), (this.x + 2) * 2 + 22, (this.y + 3) * 2 + 5, new Color(255, 255, 255, 255).getRGB()); 79 | GL11.glPopMatrix(); 80 | 81 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 82 | } else { 83 | height -= 13; 84 | y = 0; 85 | parent.buttonHeight -= 13; 86 | } 87 | } 88 | 89 | @Override 90 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 91 | if(!setting.getVisible()) return; 92 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 93 | dragging = true; 94 | } 95 | } 96 | 97 | @Override 98 | public void mouseReleased(int mouseX, int mouseY, int state) { 99 | if(!setting.getVisible()) return; 100 | dragging = false; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/halq/misericordia/fun/gui/igui/components/settings/NumberComponent.java: -------------------------------------------------------------------------------- 1 | package halq.misericordia.fun.gui.igui.components.settings; 2 | 3 | import halq.misericordia.fun.executor.settings.SettingDouble; 4 | import halq.misericordia.fun.gui.igui.components.Component; 5 | import halq.misericordia.fun.gui.igui.components.module.ModuleComponent; 6 | import halq.misericordia.fun.utils.utils.RenderUtil; 7 | import halq.misericordia.fun.executor.modules.client.InteligentGui; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.Gui; 10 | import org.lwjgl.opengl.GL11; 11 | 12 | import java.awt.*; 13 | import java.text.DecimalFormat; 14 | 15 | /** 16 | * @author Halq 17 | * @since 19/11/2022 at 21:28 18 | */ 19 | 20 | public class NumberComponent implements Component { 21 | 22 | private final Minecraft mc = Minecraft.getMinecraft(); 23 | public int x; 24 | public int y; 25 | public int height; 26 | int width; 27 | int sliderwidth = 0; 28 | SettingDouble setting; 29 | boolean dragging; 30 | ModuleComponent parent; 31 | public boolean notVisible = false; 32 | 33 | public NumberComponent(ModuleComponent parent, int x, int y, SettingDouble setting) { 34 | this.x = x; 35 | this.y = y; 36 | this.width = 88; 37 | this.height = 13; 38 | this.parent = parent; 39 | this.setting = setting; 40 | boolean notVisible = !setting.getVisible(); 41 | } 42 | 43 | private void updateSlider(int mouseX) { 44 | double diff = Math.min(width, Math.max(0, mouseX - x)); 45 | 46 | double min = setting.getMinValue(); 47 | double max = setting.getMaxValue(); 48 | 49 | sliderwidth = (int) (setting.getValue() * width / max); 50 | 51 | if (dragging) { 52 | if (diff == 0) { 53 | setting.setValue(min); 54 | } else { 55 | setting.setValue(min + (max - min) * diff / width); 56 | } 57 | } 58 | } 59 | 60 | @Override 61 | public void render(int mouseX, int mouseY) { 62 | if (setting.getVisible()) { 63 | height = 13; 64 | 65 | updateSlider(mouseX); 66 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 255).getRGB()); 67 | 68 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height) { 69 | Gui.drawRect(x + 2, y, x + width, y + height, new Color(13, 13, 23, 182).brighter().getRGB()); 70 | } 71 | 72 | GL11.glPushMatrix(); 73 | GL11.glScaled(0.5, 0.5, 0.5); 74 | Gui.drawRect((this.x + 2) * 2 + 20, (this.y + 2) * 2 + 5, (this.x + 2) * 2 + 21 + sliderwidth, (this.y + 2) * 2 + 5 + height, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 75 | DecimalFormat df = new DecimalFormat("#.#"); 76 | String displayval = df.format(setting.getValue()); 77 | mc.fontRenderer.drawStringWithShadow(displayval + "", (this.x + 2) * 2 + 120, (this.y + 3) * 2 + 5, new Color(255, 255, 255, 255).getRGB()); 78 | mc.fontRenderer.drawStringWithShadow(setting.getName(), (this.x + 2) * 2 + 22, (this.y + 3) * 2 + 5, new Color(255, 255, 255, 255).getRGB()); 79 | GL11.glPopMatrix(); 80 | 81 | RenderUtil.drawLine(x + 2, y, x + 2, y + height, 1.5f, new Color(InteligentGui.INSTANCE.red.getValue().intValue(), InteligentGui.INSTANCE.green.getValue().intValue(), InteligentGui.INSTANCE.blue.getValue().intValue(), InteligentGui.INSTANCE.alpha.getValue().intValue()).getRGB()); 82 | } else { 83 | height -= 13; 84 | y = 0; 85 | parent.buttonHeight -= 13; 86 | } 87 | } 88 | 89 | @Override 90 | public void mouseClicked(int mouseX, int mouseY, int mouseButton) { 91 | if(!setting.getVisible()) return; 92 | if (mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height && mouseButton == 0) { 93 | dragging = true; 94 | } 95 | } 96 | 97 | @Override 98 | public void mouseReleased(int mouseX, int mouseY, int state) { 99 | if(!setting.getVisible()) return; 100 | dragging = false; 101 | } 102 | } 103 | --------------------------------------------------------------------------------