├── .github ├── ISSUE_TEMPLATE │ └── bug.yml ├── discordWebhook.js ├── images │ ├── ClickGUI.png │ ├── Updated_ClickGUI.png │ ├── heliosclientgui.png │ ├── heliosdevelopment.png │ └── logo.png └── workflows │ └── gradle.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build.gradle ├── examples ├── AutoRepair.lua └── itemframedupe.lua ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main ├── java └── dev │ └── heliosclient │ ├── HeliosClient.java │ ├── PreLaunchMain.java │ ├── addon │ ├── AddonManager.java │ └── HeliosAddon.java │ ├── altmanager │ ├── Account.java │ ├── MicrosoftAuthExtractor.java │ ├── XboxLiveAuthenticator.java │ └── accounts │ │ ├── CrackedAccount.java │ │ ├── MojangAccount.java │ │ ├── SessionIDAccount.java │ │ └── TheAlteningAccount.java │ ├── command │ ├── Command.java │ ├── CommandArgumentType.java │ ├── ModuleArgumentType.java │ └── commands │ │ ├── Bind.java │ │ ├── Friend.java │ │ ├── Help.java │ │ ├── LoadScript.java │ │ ├── Prefix.java │ │ ├── ReloadScripts.java │ │ ├── Reset.java │ │ ├── Teleport.java │ │ ├── Toggle.java │ │ └── VClip.java │ ├── event │ ├── Cancelable.java │ ├── Event.java │ ├── LuaEvent.java │ ├── SubscribeEvent.java │ ├── events │ │ ├── TickEvent.java │ │ ├── block │ │ │ ├── BeginBreakingBlockEvent.java │ │ │ ├── BlockBreakEvent.java │ │ │ ├── BlockInteractEvent.java │ │ │ ├── BlockShapeEvent.java │ │ │ ├── CancelBlockBreakingEvent.java │ │ │ └── PostAttackBlockEvent.java │ │ ├── client │ │ │ ├── ClientStopEvent.java │ │ │ ├── InventoryEvent.java │ │ │ ├── OpenScreenEvent.java │ │ │ ├── ScreenResizeEvent.java │ │ │ └── ServerConnectHeadEvent.java │ │ ├── entity │ │ │ ├── EntityAddedEvent.java │ │ │ ├── EntityInteractEvent.java │ │ │ ├── EntityMotionEvent.java │ │ │ ├── EntityRemovedEvent.java │ │ │ └── ItemPhysicsEvent.java │ │ ├── heliosclient │ │ │ └── FontChangeEvent.java │ │ ├── input │ │ │ ├── CharTypedEvent.java │ │ │ ├── KeyHeldEvent.java │ │ │ ├── KeyPressedEvent.java │ │ │ ├── KeyReleasedEvent.java │ │ │ ├── KeyboardInputEvent.java │ │ │ ├── MouseClickEvent.java │ │ │ ├── MouseReleaseEvent.java │ │ │ └── MouseScrollEvent.java │ │ ├── player │ │ │ ├── ChatMessageEvent.java │ │ │ ├── ClipAtLedgeEvent.java │ │ │ ├── DisconnectEvent.java │ │ │ ├── ItemDropEvent.java │ │ │ ├── ItemPickupEvent.java │ │ │ ├── PacketEvent.java │ │ │ ├── PlayerAttackEntityEvent.java │ │ │ ├── PlayerDamageEvent.java │ │ │ ├── PlayerDeathEvent.java │ │ │ ├── PlayerJoinEvent.java │ │ │ ├── PlayerJumpEvent.java │ │ │ ├── PlayerMotionEvent.java │ │ │ ├── PlayerRespawnEvent.java │ │ │ ├── PostMovementUpdatePlayerEvent.java │ │ │ └── SendMovementPacketEvent.java │ │ ├── render │ │ │ ├── ArmRenderEvent.java │ │ │ ├── CrosshairRenderEvent.java │ │ │ ├── EntityLabelRenderEvent.java │ │ │ ├── HeldItemRendererEvent.java │ │ │ ├── Render3DEvent.java │ │ │ └── RenderEvent.java │ │ └── world │ │ │ ├── ChunkDataEvent.java │ │ │ ├── ExplosionEvent.java │ │ │ └── ParticleEvent.java │ └── listener │ │ └── Listener.java │ ├── hud │ ├── HudElement.java │ ├── HudElementData.java │ ├── HudElementList.java │ └── hudelements │ │ ├── ArmorHud.java │ │ ├── ClientTag.java │ │ ├── ClockHud.java │ │ ├── CompactData.java │ │ ├── CoordinatesHud.java │ │ ├── DirectionHud.java │ │ ├── Fps.java │ │ ├── KeyBindsHud.java │ │ ├── LagTimerHud.java │ │ ├── ModuleList.java │ │ ├── Ping.java │ │ ├── PlayerModel.java │ │ ├── Radar.java │ │ ├── ScaffoldCount.java │ │ ├── SpeedHud.java │ │ ├── Tps.java │ │ └── WelcomeHud.java │ ├── managers │ ├── CapeManager.java │ ├── CategoryManager.java │ ├── ColorManager.java │ ├── CommandManager.java │ ├── EventManager.java │ ├── FontManager.java │ ├── FriendManager.java │ ├── GradientManager.java │ ├── HudManager.java │ ├── KeybindManager.java │ ├── ModuleManager.java │ ├── NavBarManager.java │ └── NotificationManager.java │ ├── mixin │ ├── AbstractClientPlayerEntityMixin.java │ ├── AccessorBufferBuilder.java │ ├── AccessorClientPlayerInteractionManager.java │ ├── AccessorClientWorld.java │ ├── AccessorEntityVelocityUpS2CPacket.java │ ├── AccessorFrustum.java │ ├── AccessorKeybind.java │ ├── AccessorMapState.java │ ├── AccessorMinecraftClient.java │ ├── AccessorPlayerEntityModel.java │ ├── AccessorPlayerInputC2SPacket.java │ ├── AccessorPlayerPosition.java │ ├── AccessorSignEditScreen.java │ ├── AccessorWorldRenderer.java │ ├── CapeFeatureRendererMixin.java │ ├── ChatInputSuggestorMixin.java │ ├── ChunkOcclusionGraphBuilderMixin.java │ ├── ClientConnectionMixin.java │ ├── ClientPlayerEntityMixin.java │ ├── GameRendererMixin.java │ ├── InGameHudMixin.java │ ├── ItemEntityRendererMixin.java │ ├── KeyboardMixin.java │ ├── LivingEntityRendererMixin.java │ ├── MinecraftClientMixin.java │ ├── MixinAbstractBlockState.java │ ├── MixinBackgroundRenderer.java │ ├── MixinBeaconBlockEntityRenderer.java │ ├── MixinBlock.java │ ├── MixinBlockCollisionSpliterator.java │ ├── MixinBlockEntityRenderDispatcher.java │ ├── MixinBlockModelRenderer.java │ ├── MixinBossBarHud.java │ ├── MixinCamera.java │ ├── MixinChatHud.java │ ├── MixinChatScreen.java │ ├── MixinClientPlayNetworkHandler.java │ ├── MixinClientPlayerInteractionManager.java │ ├── MixinClientWorld.java │ ├── MixinCobwebBlock.java │ ├── MixinConnectScreen.java │ ├── MixinCrashReport.java │ ├── MixinDisconnectedScreen.java │ ├── MixinEndCrystalEntityRenderer.java │ ├── MixinEntity.java │ ├── MixinEntityRenderDispatcher.java │ ├── MixinEntityRenderState.java │ ├── MixinEntityRenderer.java │ ├── MixinExplosionS2CPacket.java │ ├── MixinHandledScreen.java │ ├── MixinHeldItemRenderer.java │ ├── MixinHorseEntity.java │ ├── MixinInGameOverlayRenderer.java │ ├── MixinItemRenderer.java │ ├── MixinKeyboardInput.java │ ├── MixinLightmapTextureManager.java │ ├── MixinLivingEntity.java │ ├── MixinMinecraftServer.java │ ├── MixinPacketByteBuf.java │ ├── MixinParticleManager.java │ ├── MixinPlayerEntity.java │ ├── MixinPlayerEntityRenderer.java │ ├── MixinPlayerInput.java │ ├── MixinPlayerInventory.java │ ├── MixinRenderTickCounter.java │ ├── MixinScreen.java │ ├── MixinServerPlayNetworkHandler.java │ ├── MixinServerPlayerEntity.java │ ├── MixinSharedConstants.java │ ├── MixinSlimeBlock.java │ ├── MixinSplashScreen.java │ ├── MixinTridentItem.java │ ├── MixinVec3d.java │ ├── MixinWorld.java │ ├── MixinWorldBorder.java │ ├── MixinWorldRenderer.java │ ├── MouseMixin.java │ ├── MultiplayerScreenMixin.java │ ├── PlayerInteractEntityC2SPacketMixin.java │ ├── PlayerManagerMixin.java │ ├── SimpleOptionMixin.java │ └── TitleScreenMixin.java │ ├── module │ ├── Categories.java │ ├── Category.java │ ├── Module_.java │ ├── modules │ │ ├── chat │ │ │ ├── ChatHighlight.java │ │ │ ├── ChatTweaks.java │ │ │ ├── Notifier.java │ │ │ └── Spammer.java │ │ ├── combat │ │ │ ├── AimAssist.java │ │ │ ├── AutoTotem.java │ │ │ ├── BowSpam.java │ │ │ ├── Criticals.java │ │ │ └── TriggerBot.java │ │ ├── misc │ │ │ ├── AutoReconnect.java │ │ │ ├── BrandSpoof.java │ │ │ ├── CapeModule.java │ │ │ ├── ChestAura.java │ │ │ ├── DiscordRPCModule.java │ │ │ ├── Fucker.java │ │ │ ├── InventoryTweaks.java │ │ │ ├── NoNarrator.java │ │ │ ├── NoSwing.java │ │ │ ├── NotificationModule.java │ │ │ ├── ScriptModule.java │ │ │ ├── SilentClose.java │ │ │ └── UnfocusedCPU.java │ │ ├── movement │ │ │ ├── AirJump.java │ │ │ ├── AntiVoid.java │ │ │ ├── AutoJump.java │ │ │ ├── AutoSneak.java │ │ │ ├── AutoWalk.java │ │ │ ├── BoatFly.java │ │ │ ├── EntityControl.java │ │ │ ├── EntitySpeed.java │ │ │ ├── Fly.java │ │ │ ├── GuiMove.java │ │ │ ├── Jesus.java │ │ │ ├── NoFall.java │ │ │ ├── NoJumpDelay.java │ │ │ ├── NoLevitation.java │ │ │ ├── NoSlow.java │ │ │ ├── Phase.java │ │ │ ├── SafeWalk.java │ │ │ ├── Scaffold.java │ │ │ ├── Slippy.java │ │ │ ├── Speed.java │ │ │ ├── Spider.java │ │ │ ├── Sprint.java │ │ │ ├── Step.java │ │ │ ├── TargetStrafe.java │ │ │ ├── TickShift.java │ │ │ ├── TridentTweaker.java │ │ │ └── Velocity.java │ │ ├── player │ │ │ ├── AirPlace.java │ │ │ ├── AntiAFK.java │ │ │ ├── AntiHunger.java │ │ │ ├── AutoClicker.java │ │ │ ├── AutoEat.java │ │ │ ├── AutoLog.java │ │ │ ├── AutoRespawn.java │ │ │ ├── AutoTool.java │ │ │ ├── ExpThrower.java │ │ │ ├── FakeLag.java │ │ │ ├── FastUse.java │ │ │ ├── InventoryCleaner.java │ │ │ ├── NoBreakDelay.java │ │ │ ├── NoMiningTrace.java │ │ │ ├── NoRotate.java │ │ │ ├── PingSpoof.java │ │ │ ├── Reach.java │ │ │ ├── Rotation.java │ │ │ ├── TpsSync.java │ │ │ └── XCarry.java │ │ ├── render │ │ │ ├── AspectRatio.java │ │ │ ├── BlockESP.java │ │ │ ├── BlockSelection.java │ │ │ ├── BreakIndicator.java │ │ │ ├── CrystalESP.java │ │ │ ├── CustomCrosshair.java │ │ │ ├── CustomFov.java │ │ │ ├── ESP.java │ │ │ ├── EntityOwner.java │ │ │ ├── FreeLook.java │ │ │ ├── Freecam.java │ │ │ ├── Fullbright.java │ │ │ ├── GUI.java │ │ │ ├── HUDModule.java │ │ │ ├── HoleESP.java │ │ │ ├── ItemPhysics.java │ │ │ ├── LightLevelESP.java │ │ │ ├── LogOutSpot.java │ │ │ ├── NameTags.java │ │ │ ├── NoRender.java │ │ │ ├── StorageESP.java │ │ │ ├── Test.java │ │ │ ├── Test2.java │ │ │ ├── TimeChanger.java │ │ │ ├── TntTimer.java │ │ │ ├── Trail.java │ │ │ ├── ViewModel.java │ │ │ ├── Xray.java │ │ │ ├── Zoom.java │ │ │ └── hiteffect │ │ │ │ ├── HitEffect.java │ │ │ │ ├── HitEffectParticle.java │ │ │ │ └── particles │ │ │ │ ├── OrbParticle.java │ │ │ │ └── TextParticle.java │ │ └── world │ │ │ ├── AbortBreaking.java │ │ │ ├── AntiBookBan.java │ │ │ ├── AntiBot.java │ │ │ ├── AntiGhostBlocks.java │ │ │ ├── AutoNametag.java │ │ │ ├── BetterPortals.java │ │ │ ├── Collisions.java │ │ │ ├── LiquidInteract.java │ │ │ ├── NewChunks.java │ │ │ ├── NoInteract.java │ │ │ ├── PacketMine.java │ │ │ ├── PacketPlace.java │ │ │ ├── PaletteExploit.java │ │ │ ├── ServerScraper.java │ │ │ ├── SignTweaks.java │ │ │ ├── SpeedMine.java │ │ │ ├── TNTIgnite.java │ │ │ ├── Teams.java │ │ │ ├── Timer.java │ │ │ └── painter │ │ │ ├── Painter.java │ │ │ └── PainterFileParser.java │ ├── settings │ │ ├── BooleanSetting.java │ │ ├── ColorSetting.java │ │ ├── CycleSetting.java │ │ ├── DoubleSetting.java │ │ ├── DropDownSetting.java │ │ ├── GradientSetting.java │ │ ├── KeyBind.java │ │ ├── ParentScreenSetting.java │ │ ├── RGBASetting.java │ │ ├── Separator.java │ │ ├── Setting.java │ │ ├── SettingGroup.java │ │ ├── Space.java │ │ ├── StringListSetting.java │ │ ├── StringSetting.java │ │ ├── Vector3dSetting.java │ │ ├── buttonsetting │ │ │ ├── Button.java │ │ │ └── ButtonSetting.java │ │ └── lists │ │ │ ├── BlockListSetting.java │ │ │ ├── EntityTypeListSetting.java │ │ │ ├── ItemListSetting.java │ │ │ ├── ListSetting.java │ │ │ └── ParticleListSetting.java │ └── sysmodules │ │ └── ClickGUI.java │ ├── scripting │ ├── LuaEventManager.java │ ├── LuaExecutor.java │ ├── LuaFile.java │ ├── LuaLoader.java │ ├── LuaScriptManager.java │ └── libraries │ │ ├── ChatLib.java │ │ ├── PacketLib.java │ │ └── PlayerLib.java │ ├── system │ ├── ConsoleAppender.java │ ├── DiscordRPC.java │ ├── Friend.java │ ├── HeliosExecutor.java │ ├── HeliosSoundInstance.java │ ├── TickRate.java │ ├── UniqueID.java │ ├── config │ │ ├── Config.java │ │ └── ConfigManager.java │ └── mixininterface │ │ ├── IEntityRenderState.java │ │ ├── IExplosion.java │ │ ├── IExplosionS2CPacket.java │ │ ├── IPlayerInteractEntityC2SPacket.java │ │ ├── ISimpleOption.java │ │ └── IVec3d.java │ ├── ui │ ├── HeliosClientInfoScreen.java │ ├── altmanager │ │ └── AltManagerScreen.java │ ├── clickgui │ │ ├── CategoryPane.java │ │ ├── ClickGUIScreen.java │ │ ├── ConsoleScreen.java │ │ ├── ModuleButton.java │ │ ├── SearchBar.java │ │ ├── Tooltip.java │ │ ├── gui │ │ │ ├── HudBox.java │ │ │ ├── PolygonMeshPatternRenderer.java │ │ │ ├── TextButton.java │ │ │ ├── Window.java │ │ │ └── tables │ │ │ │ ├── Table.java │ │ │ │ └── TableEntry.java │ │ ├── hudeditor │ │ │ ├── HudCategoryPane.java │ │ │ ├── HudEditorScreen.java │ │ │ ├── HudEditorSettingScreen.java │ │ │ └── HudElementButton.java │ │ ├── navbar │ │ │ ├── NavBar.java │ │ │ └── NavBarItem.java │ │ ├── script │ │ │ ├── ScriptManagerScreen.java │ │ │ └── TestScriptEditorScreen.java │ │ └── settings │ │ │ ├── AbstractSettingScreen.java │ │ │ ├── ClientSettingsScreen.java │ │ │ ├── GradientSettingScreen.java │ │ │ ├── ListSettingsScreen.java │ │ │ ├── RGBASettingScreen.java │ │ │ └── SettingsScreen.java │ └── notification │ │ ├── Notification.java │ │ └── notifications │ │ └── InfoNotification.java │ └── util │ ├── ChatUtils.java │ ├── FileUtils.java │ ├── KeyboardUtils.java │ ├── MathUtils.java │ ├── SoundUtils.java │ ├── animation │ ├── Animation.java │ ├── AnimationUtils.java │ ├── Easing.java │ ├── EasingType.java │ ├── KeyframeAnimation.java │ └── toasts │ │ ├── ErrorToast.java │ │ └── InfoToast.java │ ├── blocks │ ├── BlockIterator.java │ ├── BlockUtils.java │ └── HoleUtils.java │ ├── cape │ ├── CapeTextureManager.java │ ├── GifDecoder.java │ ├── GifTextureManager.java │ └── ProfileUtils.java │ ├── color │ └── ColorUtils.java │ ├── entity │ ├── DisplayPreviewEntity.java │ ├── EntityUtils.java │ ├── FreeCamEntity.java │ └── TargetUtils.java │ ├── fontutils │ ├── BetterFontRenderer.java │ ├── FontLoader.java │ ├── FontRenderers.java │ └── FontUtils.java │ ├── inputbox │ ├── InputBox.java │ ├── MultiLineInputBox.java │ ├── MultiLineInputBoxOld.java │ └── lua │ │ ├── LuaLexer.java │ │ ├── LuaSyntaxManager.java │ │ ├── Token.java │ │ ├── TokenPatterns.java │ │ └── TokenType.java │ ├── interfaces │ ├── ISaveAndLoad.java │ ├── ISettingChange.java │ └── IWindowContentRenderer.java │ ├── misc │ ├── EnchantmentUtil.java │ ├── MapReader.java │ ├── ReflectionUtils.java │ └── SortMethod.java │ ├── network │ └── NetworkUtils.java │ ├── player │ ├── DamageUtils.java │ ├── InventoryUtils.java │ ├── MovementUtils.java │ ├── PlayerUtils.java │ ├── RotationSimulator.java │ └── RotationUtils.java │ ├── render │ ├── DisplayPreviewEntityRenderer.java │ ├── FrustumUtils.java │ ├── GaussianBlur.java │ ├── GradientBlockRenderer.java │ ├── Renderer.java │ ├── Renderer2D.java │ ├── Renderer3D.java │ ├── TargetRenderer.java │ ├── Vertexer.java │ ├── WireframeEntityRenderer.java │ ├── color │ │ ├── LineColor.java │ │ ├── QuadColor.java │ │ └── RenderColor.java │ └── shapes │ │ ├── Rectangle.java │ │ ├── RoundedRectangle.java │ │ └── Shape.java │ ├── textures │ ├── ClearTexture.java │ └── ClientTexture.java │ ├── timer │ ├── TickTimer.java │ └── TimerUtils.java │ └── world │ ├── ChunkChecker.java │ ├── ChunkUtils.java │ └── RaytraceUtils.java └── resources ├── assets └── heliosclient │ ├── fonts │ ├── Comfortaa.ttf │ ├── DComicFont.ttf │ ├── JetBrainsMono.ttf │ ├── Minecraft.ttf │ ├── Minecraftia.ttf │ ├── Nunito.ttf │ ├── fontello.ttf │ ├── icons.ttf │ └── icons2.ttf │ ├── heliosdevelopment.png │ ├── icon.png │ ├── sounds.json │ ├── sounds │ ├── click.ogg │ └── ting.ogg │ └── splashscreen │ └── clear.png ├── fabric.mod.json ├── heliosclient.accesswidener └── heliosclient.mixins.json /.github/images/ClickGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/.github/images/ClickGUI.png -------------------------------------------------------------------------------- /.github/images/Updated_ClickGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/.github/images/Updated_ClickGUI.png -------------------------------------------------------------------------------- /.github/images/heliosclientgui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/.github/images/heliosclientgui.png -------------------------------------------------------------------------------- /.github/images/heliosdevelopment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/.github/images/heliosdevelopment.png -------------------------------------------------------------------------------- /.github/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/.github/images/logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # gradle 2 | 3 | .gradle/ 4 | build/ 5 | out/ 6 | classes/ 7 | 8 | # eclipse 9 | 10 | *.launch 11 | 12 | # idea 13 | 14 | .idea/ 15 | *.iml 16 | *.ipr 17 | *.iws 18 | 19 | # vscode 20 | 21 | .settings/ 22 | .vscode/ 23 | bin/ 24 | .classpath 25 | .project 26 | 27 | # macos 28 | 29 | *.DS_Store 30 | 31 | # fabric 32 | 33 | run/ 34 | 35 | # java 36 | 37 | hs_err_*.log 38 | replay_*.log 39 | *.hprof 40 | *.jfr 41 | .profileconfig.json 42 | # ^^ When was this java 43 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # To be yet added 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-present HeliosMinecraft 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 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Done to increase the memory available to gradle. 2 | org.gradle.jvmargs=-Xmx2G 3 | org.gradle.parallel=true 4 | 5 | # Fabric Properties 6 | # check these on https://fabricmc.net/develop 7 | minecraft_version=1.21.5 8 | yarn_mappings=1.21.5+build.1 9 | loader_version=0.16.10 10 | 11 | # Mod Properties 12 | mod_version = alpha 13 | maven_group = alpha 14 | archives_base_name = heliosclient 15 | 16 | # Dependencies 17 | fabric_version=0.119.5+1.21.5 18 | baritone_version=1.21.4-SNAPSHOT 19 | renderer_version = 2.0.2 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { 4 | name = 'Fabric' 5 | url = 'https://maven.fabricmc.net/' 6 | } 7 | mavenCentral() 8 | gradlePluginPortal() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/PreLaunchMain.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient; 2 | 3 | import dev.heliosclient.managers.ColorManager; 4 | import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint; 5 | 6 | public class PreLaunchMain implements PreLaunchEntrypoint { 7 | @Override 8 | public void onPreLaunch() { 9 | ColorManager.createInstance(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/addon/HeliosAddon.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.addon; 2 | 3 | import dev.heliosclient.command.Command; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.module.Category; 6 | import dev.heliosclient.module.Module_; 7 | 8 | public abstract class HeliosAddon { 9 | /** 10 | * This field is automatically assigned from fabric.mod.json file of the addon 11 | */ 12 | public String name; 13 | 14 | /** 15 | * This field is automatically assigned from fabric.mod.json file of the addon 16 | */ 17 | public String[] authors; 18 | 19 | public abstract void onInitialize(); 20 | 21 | // Register stuff 22 | 23 | /** 24 | * Use {@link dev.heliosclient.managers.CategoryManager#register(Category)} in here 25 | */ 26 | public abstract void registerCategories(); 27 | 28 | /** 29 | * Use {@link dev.heliosclient.hud.HudElementList#registerElement(HudElementData)} in here 30 | */ 31 | public abstract void registerHudElementData(); 32 | 33 | /** 34 | * Use {@link dev.heliosclient.managers.ModuleManager#registerModule(Module_)} in here 35 | */ 36 | public abstract void registerModules(); 37 | 38 | /** 39 | * Use {@link dev.heliosclient.managers.CommandManager#add(Command)} in here 40 | */ 41 | public abstract void registerCommand(); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/altmanager/Account.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.altmanager; 2 | 3 | import dev.heliosclient.altmanager.accounts.CrackedAccount; 4 | 5 | public abstract class Account { 6 | private String username; 7 | private String password; 8 | //Kindof to be used while saving. Idk 9 | private boolean wasPreviouslyLoggedIn; 10 | 11 | public Account(String username, String password, boolean wasPreviouslyLoggedIn) { 12 | this.username = username; 13 | this.password = password; 14 | this.wasPreviouslyLoggedIn = wasPreviouslyLoggedIn; 15 | } 16 | public Account(String username, String password) { 17 | this.username = username; 18 | this.password = password; 19 | this.wasPreviouslyLoggedIn = false; 20 | } 21 | 22 | public String getUsername() { 23 | return username; 24 | } 25 | 26 | public void setUsername(String username) { 27 | this.username = username; 28 | } 29 | 30 | public String getPassword() { 31 | return password; 32 | } 33 | 34 | public void setPassword(String password) { 35 | this.password = password; 36 | } 37 | 38 | public boolean isCracked(){ 39 | return this instanceof CrackedAccount || (password == null && !username.isEmpty()); 40 | } 41 | 42 | public abstract boolean login(); 43 | public abstract String getDisplayName(); 44 | 45 | @Override 46 | public String toString() { 47 | return getDisplayName(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/altmanager/accounts/CrackedAccount.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.altmanager.accounts; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.altmanager.Account; 5 | import dev.heliosclient.mixin.AccessorMinecraftClient; 6 | import dev.heliosclient.util.cape.ProfileUtils; 7 | import net.minecraft.client.MinecraftClient; 8 | import net.minecraft.client.session.Session; 9 | 10 | import java.io.IOException; 11 | import java.util.Optional; 12 | 13 | public class CrackedAccount extends Account { 14 | public CrackedAccount(String username) { 15 | super(username, null); 16 | } 17 | 18 | @Override 19 | public boolean login() { 20 | try { 21 | Session session = new Session(getUsername(), ProfileUtils.getAsUUID(getUsername()), "", 22 | Optional.empty(), Optional.empty(), Session.AccountType.MOJANG); 23 | 24 | ((AccessorMinecraftClient) MinecraftClient.getInstance()).setSession(session); 25 | return true; 26 | }catch (IOException io){ 27 | HeliosClient.LOGGER.error("Unable to login via cracked account {}",getUsername()); 28 | return false; 29 | } 30 | } 31 | 32 | @Override 33 | public String getDisplayName() { 34 | return getUsername(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/Bind.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.arguments.IntegerArgumentType; 4 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 5 | import dev.heliosclient.command.Command; 6 | import dev.heliosclient.command.ModuleArgumentType; 7 | import dev.heliosclient.module.Module_; 8 | import dev.heliosclient.util.ChatUtils; 9 | import dev.heliosclient.util.KeyboardUtils; 10 | import dev.heliosclient.util.color.ColorUtils; 11 | import net.minecraft.client.network.ClientPlayerEntity; 12 | import net.minecraft.command.CommandSource; 13 | 14 | public class Bind extends Command { 15 | 16 | public Bind() { 17 | super("bind", "Binds command to a key", "b", "key"); 18 | } 19 | 20 | @Override 21 | public void build(LiteralArgumentBuilder builder) { 22 | builder.then(argument("module", new ModuleArgumentType()) 23 | .then(argument("key", IntegerArgumentType.integer()) 24 | .executes(context -> { 25 | ClientPlayerEntity player = mc.player; 26 | assert player != null; 27 | 28 | Module_ module = context.getArgument("module", Module_.class); 29 | module.setKeybind(context.getArgument("key", Integer.class)); 30 | 31 | ChatUtils.sendHeliosMsg("Set keybind for module " + ColorUtils.aqua + module.name + ColorUtils.reset + " to " + ColorUtils.aqua + KeyboardUtils.translate(module.getKeybind()) + ColorUtils.reset + "."); 32 | 33 | return SINGLE_SUCCESS; 34 | }))); 35 | 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/LoadScript.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.arguments.StringArgumentType; 4 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 5 | import dev.heliosclient.command.Command; 6 | import dev.heliosclient.scripting.LuaFile; 7 | import dev.heliosclient.scripting.LuaScriptManager; 8 | import dev.heliosclient.util.ChatUtils; 9 | import dev.heliosclient.util.color.ColorUtils; 10 | import net.minecraft.command.CommandSource; 11 | 12 | public class LoadScript extends Command { 13 | public LoadScript() { 14 | super("loadScript", "Loads a lua script"); 15 | } 16 | 17 | @Override 18 | public void build(LiteralArgumentBuilder builder) { 19 | builder.then(argument("scriptname", StringArgumentType.word()) 20 | .executes(context -> { 21 | String scriptname = StringArgumentType.getString(context, "scriptname"); 22 | for (LuaFile file : LuaScriptManager.luaFiles) { 23 | if (file.getScriptName().equalsIgnoreCase(scriptname)) { 24 | LuaScriptManager.INSTANCE.loadScript(file); 25 | ChatUtils.sendHeliosMsg(ColorUtils.green + "Loaded script " + ColorUtils.darkGray + "[" + ColorUtils.aqua + file.getFile().getName() + ColorUtils.darkGray + "]"); 26 | return SINGLE_SUCCESS; 27 | } 28 | } 29 | 30 | ChatUtils.sendHeliosMsg(ColorUtils.red + "Script of name {" + scriptname + "} not found"); 31 | return SINGLE_SUCCESS; 32 | })); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/Prefix.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.arguments.StringArgumentType; 4 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 5 | import dev.heliosclient.command.Command; 6 | import dev.heliosclient.managers.CommandManager; 7 | import dev.heliosclient.util.ChatUtils; 8 | import dev.heliosclient.util.color.ColorUtils; 9 | import net.minecraft.client.network.ClientPlayerEntity; 10 | import net.minecraft.command.CommandSource; 11 | 12 | public class Prefix extends Command { 13 | 14 | public Prefix() { 15 | super("prefix", "Sets the command prefix.", "p"); 16 | } 17 | 18 | @Override 19 | public void build(LiteralArgumentBuilder builder) { 20 | builder.then(argument("prefix", StringArgumentType.word()) 21 | .executes(context -> { 22 | ClientPlayerEntity player = mc.player; 23 | assert player != null; 24 | 25 | String prefix = context.getArgument("prefix", String.class); 26 | CommandManager.prefix = prefix; 27 | 28 | ChatUtils.sendHeliosMsg("Changed prefix to " + ColorUtils.aqua + prefix + ColorUtils.reset + "."); 29 | 30 | return SINGLE_SUCCESS; 31 | })); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/ReloadScripts.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 4 | import dev.heliosclient.command.Command; 5 | import dev.heliosclient.scripting.LuaScriptManager; 6 | import dev.heliosclient.util.ChatUtils; 7 | import dev.heliosclient.util.color.ColorUtils; 8 | import net.minecraft.command.CommandSource; 9 | 10 | public class ReloadScripts extends Command { 11 | public ReloadScripts() { 12 | super("reloadScripts", "Reload all Lua Scripts"); 13 | } 14 | 15 | @Override 16 | public void build(LiteralArgumentBuilder builder) { 17 | builder.executes((context -> { 18 | LuaScriptManager.getScripts(); 19 | ChatUtils.sendHeliosMsg(ColorUtils.green + "Successfully reloaded all lua scripts"); 20 | return SINGLE_SUCCESS; 21 | })); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/Reset.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 4 | import dev.heliosclient.HeliosClient; 5 | import dev.heliosclient.command.Command; 6 | import dev.heliosclient.managers.ModuleManager; 7 | import dev.heliosclient.util.ChatUtils; 8 | import net.minecraft.command.CommandSource; 9 | 10 | public class Reset extends Command { 11 | public Reset() { 12 | super("reset", "Resets all config options.", "r"); 13 | } 14 | 15 | @Override 16 | public void build(LiteralArgumentBuilder builder) { 17 | builder.executes(context -> { 18 | ModuleManager.init(); 19 | HeliosClient.CONFIG.writeDefaultModuleConfig(); 20 | 21 | ChatUtils.sendHeliosMsg("Reset config."); 22 | 23 | return SINGLE_SUCCESS; 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/Toggle.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 4 | import dev.heliosclient.command.Command; 5 | import dev.heliosclient.command.ModuleArgumentType; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.client.network.ClientPlayerEntity; 8 | import net.minecraft.command.CommandSource; 9 | 10 | public class Toggle extends Command { 11 | 12 | public Toggle() { 13 | super("toggle", "Toggle a module.", "t"); 14 | } 15 | 16 | @Override 17 | public void build(LiteralArgumentBuilder builder) { 18 | builder.then(argument("module", new ModuleArgumentType()).executes(context -> 19 | { 20 | ClientPlayerEntity player = mc.player; 21 | assert player != null; 22 | 23 | Module_ m = context.getArgument("module", Module_.class); 24 | m.toggle(); 25 | 26 | return SINGLE_SUCCESS; 27 | })); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/command/commands/VClip.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.command.commands; 2 | 3 | import com.mojang.brigadier.arguments.DoubleArgumentType; 4 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 5 | import dev.heliosclient.command.Command; 6 | import net.minecraft.client.network.ClientPlayerEntity; 7 | import net.minecraft.command.CommandSource; 8 | import net.minecraft.entity.Entity; 9 | 10 | public class VClip extends Command { 11 | 12 | public VClip() { 13 | super("vclip", "Teleports you vertically."); 14 | } 15 | 16 | @Override 17 | public void build(LiteralArgumentBuilder builder) { 18 | builder.then(argument("blocks", DoubleArgumentType.doubleArg()).executes(context -> 19 | { 20 | ClientPlayerEntity player = mc.player; 21 | assert player != null; 22 | 23 | double blocks = context.getArgument("blocks", Double.class); 24 | if (player.hasVehicle()) { 25 | Entity vehicle = player.getVehicle(); 26 | if (vehicle != null) { 27 | vehicle.setPosition(vehicle.getX(), vehicle.getY() + blocks, vehicle.getZ()); 28 | } 29 | } 30 | player.setPosition(player.getX(), player.getY() + blocks, player.getZ()); 31 | 32 | return SINGLE_SUCCESS; 33 | })); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/Cancelable.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * This annotation indicates that an event can be canceled 10 | * To be used over Event Class declaration 11 | */ 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Target(ElementType.TYPE) 14 | public @interface Cancelable { 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/Event.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event; 2 | 3 | // This abstract class is the base class for all events 4 | public abstract class Event { 5 | // This field indicates whether the event is canceled or not 6 | private boolean canceled = false; 7 | 8 | /** 9 | * @return True if the event is cancelable, false otherwise 10 | */ 11 | public boolean isCancelable() { 12 | return this.getClass().isAnnotationPresent(Cancelable.class); 13 | } 14 | 15 | /** 16 | * @return Returns true if the event is canceled, false otherwise 17 | */ 18 | public boolean isCanceled() { 19 | return canceled; 20 | } 21 | 22 | /** 23 | * This method sets the canceled state of the event 24 | * 25 | * @param canceled Target state. 26 | */ 27 | public void setCanceled(boolean canceled) { 28 | if (!isCancelable()) { 29 | throw new IllegalStateException("This event cannot be canceled"); 30 | } 31 | this.canceled = canceled; 32 | } 33 | /** 34 | * This method cancels the event 35 | */ 36 | public void cancel() { 37 | this.setCanceled(true); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/SubscribeEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.METHOD) 10 | public @interface SubscribeEvent { 11 | Priority priority() default Priority.NORMAL; // Default priority set to NORMAL 12 | 13 | enum Priority { 14 | LOWEST, 15 | LOW, 16 | NORMAL, 17 | HIGH, 18 | HIGHEST 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/TickEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events; 2 | 3 | import dev.heliosclient.event.Event; 4 | import dev.heliosclient.event.LuaEvent; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | 7 | /** 8 | * Something really important 9 | * 10 | *

11 | * Note: The TickEvent class will not be posted by the EventManager. Instead, use the subclass CLIENT. 12 | *

13 | */ 14 | public abstract class TickEvent extends Event { 15 | private TickEvent(){} 16 | 17 | //Called for every Client tick 18 | @LuaEvent("ClientTick") 19 | public static class CLIENT extends TickEvent { 20 | public static class PRE extends CLIENT{ 21 | 22 | } 23 | public static class POST extends CLIENT{ 24 | 25 | } 26 | } 27 | 28 | @LuaEvent("WorldTick") 29 | public static class WORLD extends TickEvent { 30 | //Called for every clientWorld Tick 31 | } 32 | 33 | @LuaEvent("PlayerTick") 34 | public static class PLAYER extends TickEvent { 35 | 36 | //Called for every client player alive tick 37 | 38 | public static PLAYER INSTANCE = new PLAYER(); 39 | 40 | private PlayerEntity player; 41 | 42 | public static PLAYER get(PlayerEntity player) { 43 | INSTANCE.player = player; 44 | return INSTANCE; 45 | } 46 | 47 | public PlayerEntity getPlayer() { 48 | return player; 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/BeginBreakingBlockEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.util.math.BlockPos; 6 | import net.minecraft.util.math.Direction; 7 | 8 | @Cancelable 9 | public class BeginBreakingBlockEvent extends Event { 10 | private final BlockPos pos; 11 | private final Direction dir; 12 | 13 | 14 | public BeginBreakingBlockEvent(BlockPos pos, Direction dir) { 15 | this.pos = pos; 16 | this.dir = dir; 17 | } 18 | 19 | public BlockPos getPos() { 20 | return pos; 21 | } 22 | 23 | public Direction getDir() { 24 | return dir; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/BlockBreakEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.block.BlockState; 7 | import net.minecraft.util.math.BlockPos; 8 | 9 | /** 10 | * Event fired every time block gets broken. 11 | */ 12 | @Cancelable 13 | @LuaEvent("BlockBreakEvent") 14 | public class BlockBreakEvent extends Event { 15 | private final BlockPos pos; 16 | private final BlockState state; 17 | 18 | public BlockBreakEvent(BlockPos pos, BlockState state) { 19 | this.pos = pos; 20 | this.state = state; 21 | } 22 | 23 | /** 24 | * Lua code: "pos" 25 | * 26 | * @return Position of BlockBreakEvent 27 | */ 28 | public BlockPos getPos() { 29 | return pos; 30 | } 31 | 32 | /** 33 | * Lua code: "state" 34 | * 35 | * @return State of BlockBreakEvent 36 | */ 37 | public BlockState getState() { 38 | return state; 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/BlockInteractEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.util.Hand; 7 | import net.minecraft.util.hit.BlockHitResult; 8 | 9 | /** 10 | * Event fired on block interaction. 11 | */ 12 | @Cancelable 13 | @LuaEvent("BlockInteractEvent") 14 | public class BlockInteractEvent extends Event { 15 | private final BlockHitResult hitResult; 16 | private final Hand hand; 17 | 18 | 19 | public BlockInteractEvent(BlockHitResult hitResult, Hand hand) { 20 | this.hitResult = hitResult; 21 | this.hand = hand; 22 | } 23 | 24 | public Hand getHand() { 25 | return hand; 26 | } 27 | 28 | public BlockHitResult getHitResult() { 29 | return hitResult; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/BlockShapeEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.block.BlockState; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraft.util.shape.VoxelShape; 8 | 9 | @Cancelable 10 | public class BlockShapeEvent extends Event { 11 | 12 | private BlockState state; 13 | private BlockPos pos; 14 | private VoxelShape shape; 15 | 16 | public BlockShapeEvent(BlockState state, BlockPos pos, VoxelShape shape) { 17 | this.state = state; 18 | this.pos = pos; 19 | this.shape = shape; 20 | } 21 | 22 | public BlockState getState() { 23 | return state; 24 | } 25 | 26 | public void setState(BlockState state) { 27 | this.state = state; 28 | } 29 | 30 | public BlockPos getPos() { 31 | return pos; 32 | } 33 | 34 | public void setPos(BlockPos pos) { 35 | this.pos = pos; 36 | } 37 | 38 | public VoxelShape getShape() { 39 | return shape; 40 | } 41 | 42 | public void setShape(VoxelShape shape) { 43 | this.shape = shape; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/CancelBlockBreakingEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | 6 | @Cancelable 7 | public class CancelBlockBreakingEvent extends Event { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/block/PostAttackBlockEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.block; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.util.math.BlockPos; 6 | import net.minecraft.util.math.Direction; 7 | 8 | @Cancelable 9 | public class PostAttackBlockEvent extends Event { 10 | private final BlockPos pos; 11 | private final Direction dir; 12 | 13 | 14 | public PostAttackBlockEvent(BlockPos pos, Direction dir) { 15 | this.pos = pos; 16 | this.dir = dir; 17 | } 18 | 19 | public BlockPos getPos() { 20 | return pos; 21 | } 22 | 23 | public Direction getDir() { 24 | return dir; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/client/ClientStopEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.client; 2 | 3 | import dev.heliosclient.event.Event; 4 | 5 | /** 6 | * This is posted when the client is stopped similar to FabricAPI's ClientLifecycleEvents. 7 | * This will also be called when an integrated server is stopping. 8 | */ 9 | public class ClientStopEvent extends Event { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/client/InventoryEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.client; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.network.packet.s2c.play.InventoryS2CPacket; 5 | 6 | public class InventoryEvent extends Event { 7 | public final InventoryS2CPacket packet; 8 | 9 | public InventoryEvent(InventoryS2CPacket packet) { 10 | this.packet = packet; 11 | } 12 | 13 | public InventoryS2CPacket getPacket() { 14 | return packet; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/client/OpenScreenEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.client; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.client.gui.screen.Screen; 6 | 7 | @Cancelable 8 | public class OpenScreenEvent extends Event { 9 | public final Screen screen; 10 | 11 | public OpenScreenEvent(Screen screen) { 12 | this.screen = screen; 13 | } 14 | 15 | public Screen getScreen() { 16 | return screen; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/client/ScreenResizeEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.client; 2 | 3 | import dev.heliosclient.event.Event; 4 | 5 | public class ScreenResizeEvent extends Event { 6 | public final int prevWidth, prevHeight, newWidth, newHeight; 7 | 8 | public ScreenResizeEvent(int prevWidth, int prevHeight, int newWidth, int newHeight) { 9 | this.prevWidth = prevWidth; 10 | this.prevHeight = prevHeight; 11 | this.newWidth = newWidth; 12 | this.newHeight = newHeight; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/client/ServerConnectHeadEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.client; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.client.network.ServerAddress; 5 | import net.minecraft.client.network.ServerInfo; 6 | 7 | public class ServerConnectHeadEvent extends Event { 8 | public final ServerInfo info; 9 | public final ServerAddress address; 10 | 11 | public ServerConnectHeadEvent(ServerInfo info, ServerAddress address) { 12 | this.info = info; 13 | this.address = address; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/entity/EntityAddedEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.entity; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.entity.Entity; 5 | 6 | public class EntityAddedEvent extends Event { 7 | public final Entity entity; 8 | 9 | public EntityAddedEvent(Entity entity) { 10 | this.entity = entity; 11 | } 12 | 13 | public Entity getEntity() { 14 | return entity; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/entity/EntityInteractEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.entity; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.util.Hand; 8 | 9 | /** 10 | * Event fired on block interaction. 11 | */ 12 | @Cancelable 13 | @LuaEvent("BlockInteractEvent") 14 | public class EntityInteractEvent extends Event { 15 | private final Entity entity; 16 | private final Hand hand; 17 | 18 | 19 | public EntityInteractEvent(Entity entity, Hand hand) { 20 | this.entity = entity; 21 | this.hand = hand; 22 | } 23 | 24 | public Hand getHand() { 25 | return hand; 26 | } 27 | 28 | public Entity getEntity() { 29 | return entity; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/entity/EntityMotionEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.entity; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraft.entity.MovementType; 6 | import net.minecraft.util.math.Vec3d; 7 | 8 | public class EntityMotionEvent extends Event { 9 | private final MovementType type; 10 | private final Vec3d movement; 11 | private final Entity entity; 12 | 13 | public EntityMotionEvent(MovementType type, Vec3d movement, Entity entity) { 14 | this.type = type; 15 | this.movement = movement; 16 | this.entity = entity; 17 | } 18 | 19 | public Entity getEntity() { 20 | return entity; 21 | } 22 | 23 | public MovementType getType() { 24 | return type; 25 | } 26 | 27 | public Vec3d getMovement() { 28 | return movement; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/entity/EntityRemovedEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.entity; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.entity.Entity; 5 | 6 | public class EntityRemovedEvent extends Event { 7 | private final Entity entity; 8 | private final int entityId; 9 | private final Entity.RemovalReason removalReason; 10 | 11 | public EntityRemovedEvent(Entity entity, Entity.RemovalReason removalReason, int entityId) { 12 | this.entity = entity; 13 | this.removalReason = removalReason; 14 | this.entityId = entityId; 15 | } 16 | 17 | public Entity.RemovalReason getRemovalReason() { 18 | return removalReason; 19 | } 20 | 21 | public int getEntityId() { 22 | return entityId; 23 | } 24 | 25 | public Entity getEntity() { 26 | return entity; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/entity/ItemPhysicsEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.entity; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.client.render.VertexConsumerProvider; 6 | import net.minecraft.client.render.entity.state.ItemEntityRenderState; 7 | import net.minecraft.client.util.math.MatrixStack; 8 | 9 | @Cancelable 10 | public class ItemPhysicsEvent extends Event { 11 | public final ItemEntityRenderState itemEntityRenderState; 12 | public final int i; 13 | public final MatrixStack matrixStack; 14 | public final VertexConsumerProvider vertexConsumerProvider; 15 | 16 | 17 | public ItemPhysicsEvent(ItemEntityRenderState itemEntityRenderState, int i, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider) { 18 | this.itemEntityRenderState = itemEntityRenderState; 19 | this.i = i; 20 | this.matrixStack = matrixStack; 21 | this.vertexConsumerProvider = vertexConsumerProvider; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/heliosclient/FontChangeEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.heliosclient; 2 | 3 | import dev.heliosclient.event.Event; 4 | 5 | public class FontChangeEvent extends Event {} 6 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/CharTypedEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | 7 | @Cancelable 8 | @LuaEvent("CharTypedEvent") 9 | public class CharTypedEvent extends Event { 10 | private final long window; 11 | private final char character; 12 | private final int j; 13 | 14 | public CharTypedEvent(long window, char character, int j) { 15 | this.window = window; 16 | this.character = character; 17 | this.j = j; 18 | } 19 | 20 | public long getWindow() { 21 | return window; 22 | } 23 | 24 | public char getCharacter() { 25 | return character; 26 | } 27 | 28 | public int getJ() { 29 | return j; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/KeyHeldEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | 7 | @Cancelable 8 | @LuaEvent("KeyHeldEvent") 9 | public class KeyHeldEvent extends Event { 10 | private final long window; 11 | private final int key; 12 | private final int scancode; 13 | private final int action; 14 | private final int modifiers; 15 | 16 | public KeyHeldEvent(long window, int key, int scancode, int action, int modifiers) { 17 | this.window = window; 18 | this.key = key; 19 | this.scancode = scancode; 20 | this.action = action; 21 | this.modifiers = modifiers; 22 | } 23 | 24 | public int getKey() { 25 | return key; 26 | } 27 | 28 | public int getAction() { 29 | return action; 30 | } 31 | 32 | public int getModifiers() { 33 | return modifiers; 34 | } 35 | 36 | public int getScancode() { 37 | return scancode; 38 | } 39 | 40 | public long getWindow() { 41 | return window; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/KeyPressedEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | 7 | @Cancelable 8 | @LuaEvent("KeyPressedEvent") 9 | public class KeyPressedEvent extends Event { 10 | private final long window; 11 | private final int key; 12 | private final int scancode; 13 | private final int action; 14 | private final int modifiers; 15 | 16 | public KeyPressedEvent(long window, int key, int scancode, int action, int modifiers) { 17 | this.window = window; 18 | this.key = key; 19 | this.scancode = scancode; 20 | this.action = action; 21 | this.modifiers = modifiers; 22 | 23 | } 24 | 25 | public int getKey() { 26 | return key; 27 | } 28 | 29 | public int getAction() { 30 | return action; 31 | } 32 | 33 | public int getModifiers() { 34 | return modifiers; 35 | } 36 | 37 | public int getScancode() { 38 | return scancode; 39 | } 40 | 41 | public long getWindow() { 42 | return window; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/KeyReleasedEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | 7 | @Cancelable 8 | @LuaEvent("KeyReleasedEvent") 9 | public class KeyReleasedEvent extends Event { 10 | private final long window; 11 | private final int key; 12 | private final int scancode; 13 | private final int action; 14 | private final int modifiers; 15 | 16 | public KeyReleasedEvent(long window, int key, int scancode, int action, int modifiers) { 17 | this.window = window; 18 | this.key = key; 19 | this.scancode = scancode; 20 | this.action = action; 21 | this.modifiers = modifiers; 22 | 23 | } 24 | 25 | public int getKey() { 26 | return key; 27 | } 28 | 29 | public int getAction() { 30 | return action; 31 | } 32 | 33 | public int getModifiers() { 34 | return modifiers; 35 | } 36 | 37 | public int getScancode() { 38 | return scancode; 39 | } 40 | 41 | public long getWindow() { 42 | return window; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/MouseClickEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.client.gui.screen.Screen; 7 | 8 | @Cancelable 9 | @LuaEvent("MouseClickedEvent") 10 | public class MouseClickEvent extends Event { 11 | private final long window; 12 | private final int button; 13 | private final int action; 14 | private final int modifiers; 15 | private final double mouseX; 16 | private final double mouseY; 17 | private final Screen screen; 18 | 19 | 20 | public MouseClickEvent(long window, int button, int action, double mouseX, double mouseY, Screen screen, int modifiers) { 21 | this.window = window; 22 | this.button = button; 23 | this.action = action; 24 | this.modifiers = modifiers; 25 | this.mouseX = mouseX; 26 | this.mouseY = mouseY; 27 | this.screen = screen; 28 | } 29 | 30 | public int getButton() { 31 | return button; 32 | } 33 | 34 | public int getAction() { 35 | return action; 36 | } 37 | 38 | public int getModifiers() { 39 | return modifiers; 40 | } 41 | 42 | public long getWindow() { 43 | return window; 44 | } 45 | 46 | public double getMouseY() { 47 | return mouseY; 48 | } 49 | 50 | public double getMouseX() { 51 | return mouseX; 52 | } 53 | 54 | public Screen getScreen() { 55 | return screen; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/MouseReleaseEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.client.gui.screen.Screen; 7 | 8 | @Cancelable 9 | @LuaEvent("MouseReleaseEvent") 10 | public class MouseReleaseEvent extends Event { 11 | private final long window; 12 | private final int button; 13 | private final int action; 14 | private final int modifiers; 15 | private final double mouseX; 16 | private final double mouseY; 17 | private final Screen screen; 18 | 19 | 20 | public MouseReleaseEvent(long window, int button, int action, double mouseX, double mouseY, Screen screen, int modifiers) { 21 | this.window = window; 22 | this.button = button; 23 | this.action = action; 24 | this.modifiers = modifiers; 25 | this.mouseX = mouseX; 26 | this.mouseY = mouseY; 27 | this.screen = screen; 28 | } 29 | 30 | public int getButton() { 31 | return button; 32 | } 33 | 34 | public int getAction() { 35 | return action; 36 | } 37 | 38 | public int getModifiers() { 39 | return modifiers; 40 | } 41 | 42 | public long getWindow() { 43 | return window; 44 | } 45 | 46 | public double getMouseY() { 47 | return mouseY; 48 | } 49 | 50 | public double getMouseX() { 51 | return mouseX; 52 | } 53 | 54 | public Screen getScreen() { 55 | return screen; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/input/MouseScrollEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.input; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | 7 | @Cancelable 8 | @LuaEvent("MouseClickedEvent") 9 | public class MouseScrollEvent extends Event { 10 | private final double mouseX; 11 | private final double mouseY; 12 | private final double verticalAmount; 13 | private final double horizontalAmount; 14 | 15 | public MouseScrollEvent(double mouseX, double mouseY, double verticalAmount, double horizontalAmount) { 16 | this.mouseX = mouseX; 17 | this.mouseY = mouseY; 18 | this.verticalAmount = verticalAmount; 19 | this.horizontalAmount = horizontalAmount; 20 | } 21 | 22 | public double getMouseX() { 23 | return mouseX; 24 | } 25 | 26 | public double getMouseY() { 27 | return mouseY; 28 | } 29 | 30 | public double getVerticalAmount() { 31 | return verticalAmount; 32 | } 33 | 34 | public double getHorizontalAmount() { 35 | return horizontalAmount; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/ChatMessageEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.client.gui.hud.MessageIndicator; 7 | import net.minecraft.network.message.MessageSignatureData; 8 | import net.minecraft.text.Text; 9 | 10 | @Cancelable 11 | @LuaEvent("ChatMsgEvent") 12 | public class ChatMessageEvent extends Event { 13 | private final MessageSignatureData signature; 14 | private final MessageIndicator indicator; 15 | private Text message; 16 | 17 | 18 | public ChatMessageEvent(Text message, MessageIndicator indicator, MessageSignatureData signature) { 19 | this.message = message; 20 | this.signature = signature; 21 | this.indicator = indicator; 22 | } 23 | 24 | public Text getMessage() { 25 | return message; 26 | } 27 | 28 | public void setMessage(Text message) { 29 | this.message = message; 30 | } 31 | 32 | public MessageIndicator getIndicator() { 33 | return indicator; 34 | } 35 | 36 | public MessageSignatureData getSignature() { 37 | return signature; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/ClipAtLedgeEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | 6 | @Cancelable 7 | public class ClipAtLedgeEvent extends Event { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/DisconnectEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | 8 | @Cancelable 9 | @LuaEvent("DisconnectEvent") 10 | public class DisconnectEvent extends Event { 11 | private final PlayerEntity player; 12 | 13 | public DisconnectEvent(PlayerEntity player) { 14 | this.player = player; 15 | } 16 | 17 | public PlayerEntity getPlayer() { 18 | return player; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/ItemDropEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.item.ItemStack; 7 | 8 | @Cancelable 9 | @LuaEvent("ItemDropEvent") 10 | public class ItemDropEvent extends Event { 11 | private final ItemStack stack; 12 | 13 | public ItemDropEvent(ItemStack stack) { 14 | this.stack = stack; 15 | } 16 | 17 | public ItemStack getStack() { 18 | return stack; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/ItemPickupEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.item.ItemStack; 7 | 8 | @Cancelable 9 | @LuaEvent("ItemPickupEvent") 10 | public class ItemPickupEvent extends Event { 11 | private final ItemStack stack; 12 | 13 | public ItemPickupEvent(ItemStack stack) { 14 | this.stack = stack; 15 | } 16 | 17 | public ItemStack getStack() { 18 | return stack; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PacketEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.network.ClientConnection; 7 | import net.minecraft.network.packet.Packet; 8 | 9 | @Cancelable 10 | @LuaEvent("PacketEvent") 11 | public class PacketEvent extends Event { 12 | public Packet packet; 13 | public ClientConnection connection; 14 | public PacketEvent(Packet packet, ClientConnection connection){ 15 | this.packet = packet; 16 | this.connection = connection; 17 | } 18 | 19 | public Packet getPacket() { 20 | return packet; 21 | } 22 | 23 | public ClientConnection getConnection() { 24 | return connection; 25 | } 26 | 27 | @Cancelable 28 | @LuaEvent("packetReceiveEvent") 29 | public static class RECEIVE extends PacketEvent { 30 | 31 | public RECEIVE(Packet packet, ClientConnection connection) { 32 | super(packet,connection); 33 | } 34 | } 35 | 36 | @Cancelable 37 | @LuaEvent("packetSendEvent") 38 | public static class SEND extends PacketEvent { 39 | public SEND(Packet packet, ClientConnection connection) { 40 | super(packet,connection); 41 | } 42 | } 43 | 44 | @LuaEvent("packetSentEvent") 45 | public static class SENT extends PacketEvent { 46 | public SENT(Packet packet, ClientConnection connection) { 47 | super(packet,connection); 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerAttackEntityEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | 8 | /** 9 | * Default is POST 10 | */ 11 | @Cancelable 12 | public class PlayerAttackEntityEvent extends Event { 13 | private final PlayerEntity player; 14 | private final Entity target; 15 | 16 | public PlayerAttackEntityEvent(PlayerEntity player, Entity target) { 17 | this.player = player; 18 | this.target = target; 19 | } 20 | 21 | public PlayerEntity getPlayer() { 22 | return player; 23 | } 24 | 25 | public Entity getTarget() { 26 | return target; 27 | } 28 | 29 | @Cancelable 30 | public static class PRE extends PlayerAttackEntityEvent { 31 | 32 | public PRE(PlayerEntity player, Entity target) { 33 | super(player, target); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerDamageEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.damage.DamageSource; 7 | import net.minecraft.entity.player.PlayerEntity; 8 | 9 | @Cancelable 10 | @LuaEvent("PlayerDamageEvent") 11 | public class PlayerDamageEvent extends Event { 12 | 13 | private final PlayerEntity player; 14 | 15 | private final DamageSource damageSource; 16 | 17 | public PlayerDamageEvent(PlayerEntity player, DamageSource damageSource) { 18 | this.player = player; 19 | this.damageSource = damageSource; 20 | } 21 | 22 | public PlayerEntity getPlayer() { 23 | return player; 24 | } 25 | 26 | public DamageSource getDamageSource() { 27 | return damageSource; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerDeathEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | 8 | @Cancelable 9 | @LuaEvent("PlayerDeathEvent") 10 | public class PlayerDeathEvent extends Event { 11 | private final PlayerEntity player; 12 | 13 | public PlayerDeathEvent(PlayerEntity player) { 14 | this.player = player; 15 | } 16 | 17 | public PlayerEntity getPlayer() { 18 | return player; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerJoinEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | import net.minecraft.network.packet.s2c.play.GameJoinS2CPacket; 8 | 9 | @Cancelable 10 | @LuaEvent("PlayerJoinEvent") 11 | public class PlayerJoinEvent extends Event { 12 | private final PlayerEntity player; 13 | private final GameJoinS2CPacket packet; 14 | 15 | 16 | public PlayerJoinEvent(PlayerEntity player, GameJoinS2CPacket packet) { 17 | this.player = player; 18 | this.packet = packet; 19 | } 20 | 21 | public PlayerEntity getPlayer() { 22 | return player; 23 | } 24 | 25 | public GameJoinS2CPacket getPacket() { 26 | return packet; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerJumpEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | 7 | @Cancelable 8 | public class PlayerJumpEvent extends Event { 9 | public final PlayerEntity player; 10 | 11 | public PlayerJumpEvent(PlayerEntity player) { 12 | this.player = player; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerMotionEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import dev.heliosclient.system.mixininterface.IVec3d; 7 | import net.minecraft.entity.MovementType; 8 | import net.minecraft.util.math.Vec3d; 9 | 10 | @Cancelable 11 | @LuaEvent("PlayerMotionEvent") 12 | public class PlayerMotionEvent extends Event { 13 | private final MovementType type; 14 | private final Vec3d movement; 15 | 16 | public PlayerMotionEvent(MovementType type, Vec3d movement) { 17 | this.type = type; 18 | this.movement = movement; 19 | } 20 | 21 | public MovementType getType() { 22 | return type; 23 | } 24 | 25 | public Vec3d getMovement() { 26 | return movement; 27 | } 28 | 29 | public IVec3d modifyMovement(){ 30 | return (IVec3d)movement; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PlayerRespawnEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket; 8 | 9 | @Cancelable 10 | @LuaEvent("PlayerRespawnEvent") 11 | public class PlayerRespawnEvent extends Event { 12 | private final PlayerEntity player; 13 | private final PlayerRespawnS2CPacket packet; 14 | 15 | public PlayerRespawnEvent(PlayerEntity player, PlayerRespawnS2CPacket packet) { 16 | this.player = player; 17 | this.packet = packet; 18 | } 19 | 20 | public PlayerEntity getPlayer() { 21 | return player; 22 | } 23 | 24 | public PlayerRespawnS2CPacket getPacket() { 25 | return packet; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/PostMovementUpdatePlayerEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | 6 | @Cancelable 7 | public class PostMovementUpdatePlayerEvent extends Event { 8 | public int numberOfTicks = 0; 9 | public boolean shiftedTicks = false; 10 | 11 | public void setNumberOfTicks(int numberOfTicks) { 12 | this.numberOfTicks = numberOfTicks; 13 | } 14 | 15 | public boolean hasShiftedTicks() { 16 | return shiftedTicks; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/player/SendMovementPacketEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.player; 2 | 3 | import dev.heliosclient.event.Event; 4 | 5 | public class SendMovementPacketEvent extends Event { 6 | public static class PRE extends SendMovementPacketEvent{} 7 | public static class POST extends SendMovementPacketEvent{} 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/render/ArmRenderEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.render; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.client.util.math.MatrixStack; 6 | import net.minecraft.util.Hand; 7 | 8 | @Cancelable 9 | public class ArmRenderEvent extends Event { 10 | private final Hand hand; 11 | private final MatrixStack matrix; 12 | 13 | public ArmRenderEvent(Hand hand, MatrixStack stack) { 14 | this.hand = hand; 15 | this.matrix = stack; 16 | } 17 | 18 | public Hand getHand() { 19 | return hand; 20 | } 21 | 22 | public MatrixStack getMatrix() { 23 | return matrix; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/render/CrosshairRenderEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.render; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.client.gui.DrawContext; 6 | 7 | @Cancelable 8 | public class CrosshairRenderEvent extends Event { 9 | public final int x ,y,width,height; 10 | public final DrawContext drawContext; 11 | 12 | public CrosshairRenderEvent(DrawContext context, int x, int y, int width, int height) { 13 | this.drawContext = context; 14 | this.x = x; 15 | this.y = y; 16 | this.width = width; 17 | this.height = height; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/render/HeldItemRendererEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.render; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.client.util.math.MatrixStack; 6 | import net.minecraft.util.Hand; 7 | 8 | @Cancelable 9 | public class HeldItemRendererEvent extends Event { 10 | private final Hand hand; 11 | private final MatrixStack matrix; 12 | 13 | public HeldItemRendererEvent(Hand hand, MatrixStack stack) { 14 | this.hand = hand; 15 | this.matrix = stack; 16 | } 17 | 18 | public Hand getHand() { 19 | return hand; 20 | } 21 | 22 | public MatrixStack getMatrix() { 23 | return matrix; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/render/Render3DEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.render; 2 | 3 | import dev.heliosclient.event.Event; 4 | import dev.heliosclient.event.LuaEvent; 5 | import net.minecraft.client.gui.DrawContext; 6 | import net.minecraft.client.util.math.MatrixStack; 7 | 8 | @LuaEvent("Render3dEvent") 9 | public class Render3DEvent extends Event { 10 | 11 | public static Render3DEvent INSTANCE = new Render3DEvent(); 12 | private MatrixStack matrices; 13 | private float tickDelta; 14 | private double offsetX; 15 | private double offsetY; 16 | private double offsetZ; 17 | 18 | public static Render3DEvent get(MatrixStack matrices, float tickDelta, double offsetX, double offsetY, double offsetZ) { 19 | INSTANCE.matrices = matrices; 20 | INSTANCE.tickDelta = tickDelta; 21 | INSTANCE.offsetX = offsetX; 22 | INSTANCE.offsetY = offsetY; 23 | INSTANCE.offsetZ = offsetZ; 24 | return INSTANCE; 25 | } 26 | 27 | private Render3DEvent(){ 28 | 29 | } 30 | 31 | 32 | public double getOffsetX() { 33 | return INSTANCE.offsetX; 34 | } 35 | 36 | public double getOffsetY() { 37 | return INSTANCE.offsetY; 38 | } 39 | 40 | public double getOffsetZ() { 41 | return INSTANCE.offsetZ; 42 | } 43 | 44 | public float getTickDelta() { 45 | return INSTANCE.tickDelta; 46 | } 47 | 48 | public MatrixStack getMatrices() { 49 | return INSTANCE.matrices; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/render/RenderEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.render; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import dev.heliosclient.event.LuaEvent; 6 | import dev.heliosclient.event.events.TickEvent; 7 | import net.minecraft.client.gui.DrawContext; 8 | import net.minecraft.entity.player.PlayerEntity; 9 | 10 | @Cancelable 11 | @LuaEvent("Render2dEvent") 12 | public class RenderEvent extends Event { 13 | public static RenderEvent INSTANCE = new RenderEvent(); 14 | private DrawContext drawContext; 15 | private float tickDelta; 16 | 17 | public static RenderEvent get(DrawContext drawContext, float tickDelta) { 18 | INSTANCE.drawContext = drawContext; 19 | INSTANCE.tickDelta = tickDelta; 20 | return INSTANCE; 21 | } 22 | 23 | private RenderEvent(){ 24 | 25 | } 26 | 27 | 28 | public DrawContext getDrawContext() { 29 | return INSTANCE.drawContext; 30 | } 31 | 32 | public float getTickDelta() { 33 | return INSTANCE.tickDelta; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/world/ChunkDataEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.world; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.network.packet.s2c.play.ChunkDataS2CPacket; 5 | import net.minecraft.world.chunk.Chunk; 6 | 7 | public class ChunkDataEvent extends Event { 8 | private final Chunk chunk; 9 | private final ChunkDataS2CPacket packet; 10 | 11 | public ChunkDataEvent(Chunk chunk, ChunkDataS2CPacket packet) { 12 | this.chunk = chunk; 13 | this.packet = packet; 14 | } 15 | 16 | public Chunk getChunk() { 17 | return chunk; 18 | } 19 | 20 | public ChunkDataS2CPacket getPacket() { 21 | return packet; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/world/ExplosionEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.world; 2 | 3 | import dev.heliosclient.event.Event; 4 | import net.minecraft.particle.ParticleEffect; 5 | import net.minecraft.util.math.Vec3d; 6 | 7 | import java.util.Optional; 8 | 9 | public class ExplosionEvent extends Event { 10 | final Vec3d center; 11 | final Optional playerKnockBack; 12 | final ParticleEffect explosionParticle; 13 | final float estimatedPower; 14 | 15 | public ExplosionEvent(Vec3d center, Optional playerKnockBack, ParticleEffect explosionParticle) { 16 | this.center = center; 17 | this.playerKnockBack = playerKnockBack; 18 | this.explosionParticle = explosionParticle; 19 | this.estimatedPower = (float) Math.sqrt(playerKnockBack.map(Vec3d::length).orElse(0.0)) * 0.5f; 20 | } 21 | 22 | public float getEstimatedPower() { 23 | return estimatedPower; 24 | } 25 | 26 | public Optional getPlayerKnockBack() { 27 | return playerKnockBack; 28 | } 29 | 30 | public ParticleEffect getExplosionParticle() { 31 | return explosionParticle; 32 | } 33 | 34 | public Vec3d getCenter() { 35 | return center; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/events/world/ParticleEvent.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.events.world; 2 | 3 | import dev.heliosclient.event.Cancelable; 4 | import dev.heliosclient.event.Event; 5 | import net.minecraft.particle.ParticleEffect; 6 | 7 | @Cancelable 8 | public class ParticleEvent extends Event { 9 | 10 | public final ParticleEffect parameters; 11 | public final double x, y, z; 12 | 13 | public ParticleEvent(ParticleEffect parameters, double x, double y, double z) { 14 | this.parameters = parameters; 15 | this.x = x; 16 | this.y = y; 17 | this.z = z; 18 | } 19 | 20 | public double getX() { 21 | return x; 22 | } 23 | 24 | public double getY() { 25 | return y; 26 | } 27 | 28 | public double getZ() { 29 | return z; 30 | } 31 | 32 | public ParticleEffect getParameters() { 33 | return parameters; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/event/listener/Listener.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.event.listener; 2 | 3 | 4 | public interface Listener { 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/HudElementData.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud; 2 | 3 | import java.util.function.Supplier; 4 | 5 | public record HudElementData(String name, String description, Supplier elementFactory) { 6 | @Override 7 | public String name() { 8 | return name; 9 | } 10 | 11 | @Override 12 | public String description() { 13 | return description; 14 | } 15 | 16 | public HudElement create() { 17 | return elementFactory.get(); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/hudelements/Fps.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud.hudelements; 2 | 3 | import dev.heliosclient.hud.HudElement; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.managers.ColorManager; 6 | import dev.heliosclient.util.color.ColorUtils; 7 | import dev.heliosclient.util.render.Renderer2D; 8 | import net.minecraft.client.font.TextRenderer; 9 | import net.minecraft.client.gui.DrawContext; 10 | 11 | public class Fps extends HudElement { 12 | public static HudElementData DATA = new HudElementData<>("FPS", "Shows current Fps", Fps::new); 13 | 14 | public Fps() { 15 | super(DATA); 16 | this.width = 20; 17 | this.height = Math.round(Renderer2D.getStringHeight()); 18 | } 19 | 20 | @Override 21 | public void renderElement(DrawContext drawContext, TextRenderer textRenderer) { 22 | super.renderElement(drawContext, textRenderer); 23 | String text = "FPS: " + ColorUtils.gray + mc.getCurrentFps(); 24 | this.width = Math.round(Renderer2D.getStringWidth(text)) + 1; 25 | Renderer2D.drawString(drawContext.getMatrices(), text, this.x + 1, this.y, ColorManager.INSTANCE.hudColor); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/hudelements/LagTimerHud.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud.hudelements; 2 | 3 | import dev.heliosclient.hud.HudElement; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.system.TickRate; 6 | import dev.heliosclient.util.color.ColorUtils; 7 | import dev.heliosclient.util.render.Renderer2D; 8 | import net.minecraft.client.font.TextRenderer; 9 | import net.minecraft.client.gui.DrawContext; 10 | 11 | import java.awt.*; 12 | 13 | public class LagTimerHud extends HudElement { 14 | public static HudElementData DATA = new HudElementData<>("LagTimerHud", "Shows how long the server has been lagging for", LagTimerHud::new); 15 | 16 | public LagTimerHud() { 17 | super(DATA); 18 | this.height = Math.round(Renderer2D.getStringHeight()); 19 | } 20 | 21 | @Override 22 | public void renderElement(DrawContext drawContext, TextRenderer textRenderer) { 23 | super.renderElement(drawContext, textRenderer); 24 | float timeSinceLastTick = TickRate.INSTANCE.getTimeSinceLastTick(); 25 | 26 | if(isInHudEditor){ 27 | timeSinceLastTick = 5; 28 | } 29 | 30 | if (timeSinceLastTick >= 1f) { 31 | Color color; 32 | 33 | if (timeSinceLastTick > 10) color = Color.RED; 34 | else if (timeSinceLastTick > 3) color = Color.ORANGE; 35 | else color = Color.YELLOW; 36 | 37 | String text = String.format(ColorUtils.white + "Latency since last tick: " + ColorUtils.reset + "%.1f", timeSinceLastTick); 38 | this.width = Math.round(Renderer2D.getStringWidth(text) + 1); 39 | Renderer2D.drawString(drawContext.getMatrices(), text, this.x, this.y, color.getRGB()); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/hudelements/Ping.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud.hudelements; 2 | 3 | import dev.heliosclient.hud.HudElement; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.managers.ColorManager; 6 | import dev.heliosclient.util.color.ColorUtils; 7 | import dev.heliosclient.util.render.Renderer2D; 8 | import net.minecraft.client.font.TextRenderer; 9 | import net.minecraft.client.gui.DrawContext; 10 | import net.minecraft.client.network.PlayerListEntry; 11 | 12 | public class Ping extends HudElement { 13 | 14 | public Ping() { 15 | super(DATA); 16 | 17 | this.width = 20; 18 | this.height = Math.round(Renderer2D.getStringHeight()); 19 | } public static HudElementData DATA = new HudElementData<>("Ping", "Shows current player ping", Ping::new); 20 | 21 | public static int getPing() { 22 | if (mc.player == null) { 23 | return 0; 24 | } 25 | PlayerListEntry entry = mc.player.networkHandler.getPlayerListEntry(mc.player.getUuid()); 26 | if (entry != null) { 27 | return entry.getLatency(); 28 | } 29 | return 0; 30 | } 31 | 32 | @Override 33 | public void renderElement(DrawContext drawContext, TextRenderer textRenderer) { 34 | super.renderElement(drawContext, textRenderer); 35 | String text = "Ping: " + ColorUtils.gray + getPing(); 36 | this.width = Math.round(Renderer2D.getStringWidth(text) + 1); 37 | Renderer2D.drawString(drawContext.getMatrices(), text, this.x, this.y, ColorManager.INSTANCE.hudColor); 38 | } 39 | 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/hudelements/SpeedHud.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud.hudelements; 2 | 3 | import dev.heliosclient.hud.HudElement; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.managers.ColorManager; 6 | import dev.heliosclient.util.MathUtils; 7 | import dev.heliosclient.util.color.ColorUtils; 8 | import dev.heliosclient.util.render.Renderer2D; 9 | import net.minecraft.client.font.TextRenderer; 10 | import net.minecraft.client.gui.DrawContext; 11 | import net.minecraft.util.math.Vec3d; 12 | 13 | 14 | public class SpeedHud extends HudElement { 15 | public SpeedHud() { 16 | super(DATA); 17 | this.width = 40; 18 | this.height = Math.round(Renderer2D.getStringHeight()); 19 | } 20 | 21 | public static HudElementData DATA = new HudElementData<>("Player Speed", "Shows player speed in blocks per second aka meter per second", SpeedHud::new); 22 | 23 | @Override 24 | public void renderElement(DrawContext drawContext, TextRenderer textRenderer) { 25 | super.renderElement(drawContext, textRenderer); 26 | String text = "Speed: "; 27 | String value = ColorUtils.gray + MathUtils.round(moveSpeed(), 2); 28 | this.width = Math.round(Renderer2D.getStringWidth(text + value)); 29 | Renderer2D.drawString(drawContext.getMatrices(), text + value, this.x, this.y, ColorManager.INSTANCE.hudColor); 30 | } 31 | 32 | private double moveSpeed() { 33 | if (mc.player == null) { 34 | return 0; 35 | } 36 | Vec3d move = new Vec3d(mc.player.getX() - mc.player.prevX, 0, mc.player.getZ() - mc.player.prevZ).multiply(20); 37 | 38 | return Math.abs(MathUtils.length2D(move)); 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/hud/hudelements/Tps.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.hud.hudelements; 2 | 3 | import dev.heliosclient.hud.HudElement; 4 | import dev.heliosclient.hud.HudElementData; 5 | import dev.heliosclient.managers.ColorManager; 6 | import dev.heliosclient.system.TickRate; 7 | import dev.heliosclient.util.MathUtils; 8 | import dev.heliosclient.util.color.ColorUtils; 9 | import dev.heliosclient.util.render.Renderer2D; 10 | import net.minecraft.client.font.TextRenderer; 11 | import net.minecraft.client.gui.DrawContext; 12 | 13 | public class Tps extends HudElement { 14 | public static HudElementData DATA = new HudElementData<>("TPS", "Shows current server tps", Tps::new); 15 | 16 | public Tps() { 17 | super(DATA); 18 | this.width = 20; 19 | this.height = Math.round(Renderer2D.getStringHeight()); 20 | } 21 | 22 | @Override 23 | public void renderElement(DrawContext drawContext, TextRenderer textRenderer) { 24 | super.renderElement(drawContext, textRenderer); 25 | String text = "TPS: " + ColorUtils.gray + MathUtils.round(TickRate.INSTANCE.getTPS(), 1); 26 | this.width = Math.round(Renderer2D.getStringWidth(text)) + 1; 27 | Renderer2D.drawString(drawContext.getMatrices(), text, this.x, this.y, ColorManager.INSTANCE.hudColor); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/managers/CategoryManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.managers; 2 | 3 | import dev.heliosclient.module.Category; 4 | import dev.heliosclient.ui.clickgui.CategoryPane; 5 | import dev.heliosclient.ui.clickgui.ClickGUIScreen; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | public class CategoryManager { 11 | private static final Map categories = new HashMap<>(); 12 | 13 | public static void register(String name) { 14 | categories.put(name, new Category(name)); 15 | } 16 | 17 | public static void register(Category category) { 18 | categories.put(category.name, category); 19 | } 20 | 21 | public static Category getCategory(String name) { 22 | return categories.get(name); 23 | } 24 | 25 | public static Category getCategory(Category category) { 26 | return categories.get(category.name); 27 | } 28 | 29 | public static Map getCategories() { 30 | return categories; 31 | } 32 | 33 | public static CategoryPane findCategoryPane(Category category) { 34 | for (CategoryPane pane : ClickGUIScreen.INSTANCE.categoryPanes) { 35 | if (pane.category.equals(category)) { 36 | return pane; 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/managers/FriendManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.managers; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.system.Friend; 5 | import dev.heliosclient.util.ChatUtils; 6 | 7 | import java.util.HashSet; 8 | import java.util.Objects; 9 | 10 | public class FriendManager { 11 | private static final HashSet friendsName = new HashSet<>(); 12 | private static HashSet friends = new HashSet<>(); 13 | 14 | public FriendManager() { 15 | for (Friend friend : friends) { 16 | friendsName.add(friend.playerName()); 17 | } 18 | } 19 | 20 | public static boolean isFriend(Friend friend) { 21 | return friends.contains(friend); 22 | } 23 | 24 | public static boolean isFriend(String userName) { 25 | return friendsName.contains(userName); 26 | } 27 | 28 | public static void addFriend(Friend friend) { 29 | if (Objects.equals(friend.playerName(), HeliosClient.MC.getSession().getUsername())) { 30 | ChatUtils.sendHeliosMsg("You can't befriend yourself."); 31 | } else { 32 | friends.add(friend); 33 | friendsName.add(friend.playerName()); 34 | } 35 | } 36 | 37 | public static void removeFriend(Friend friend) { 38 | friends.remove(friend); 39 | friendsName.remove(friend.playerName()); 40 | } 41 | 42 | public static HashSet getFriends() { 43 | return friends; 44 | } 45 | 46 | public static void setFriends(HashSet friends) { 47 | FriendManager.friends = friends; 48 | } 49 | 50 | public static HashSet getFriendsName() { 51 | return friendsName; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/managers/NavBarManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.managers; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.ui.clickgui.ClickGUIScreen; 5 | import dev.heliosclient.ui.clickgui.hudeditor.HudEditorScreen; 6 | import dev.heliosclient.ui.clickgui.navbar.NavBarItem; 7 | import dev.heliosclient.ui.clickgui.script.ScriptManagerScreen; 8 | import dev.heliosclient.ui.clickgui.settings.ClientSettingsScreen; 9 | 10 | import java.util.ArrayList; 11 | import java.util.Arrays; 12 | 13 | public class NavBarManager { 14 | public static NavBarManager INSTANCE = new NavBarManager(); 15 | public ArrayList navBarItems = new ArrayList<>(); 16 | 17 | public NavBarManager() { 18 | registerItems( 19 | new NavBarItem("ClickGUI", "ClickGUI", () -> ClickGUIScreen.INSTANCE), 20 | new NavBarItem("Settings", "ClickGUI Setting", new ClientSettingsScreen(HeliosClient.CLICKGUI)), 21 | new NavBarItem("Console", "Console screen", () -> HeliosClient.CONSOLE), 22 | new NavBarItem("Scripts", "Script Manager", () -> ScriptManagerScreen.INSTANCE), 23 | new NavBarItem("HudEditor", "HUD editor", () -> HudEditorScreen.INSTANCE) 24 | ); 25 | } 26 | 27 | public void registerItems(NavBarItem... items) { 28 | this.navBarItems.addAll(Arrays.asList(items)); 29 | } 30 | public void unregisterItem(NavBarItem item) { 31 | this.navBarItems.remove(item); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorBufferBuilder.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.render.BufferBuilder; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(BufferBuilder.class) 8 | public interface AccessorBufferBuilder { 9 | @Accessor("building") 10 | boolean isBuilding(); 11 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorClientPlayerInteractionManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.network.ClientPlayerInteractionManager; 4 | import net.minecraft.util.math.BlockPos; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(ClientPlayerInteractionManager.class) 9 | public interface AccessorClientPlayerInteractionManager { 10 | 11 | @Accessor("currentBreakingPos") 12 | BlockPos getCurrentBreakingBlockPos(); 13 | 14 | @Accessor("currentBreakingProgress") 15 | void setCurrentBreakingProgress(float currentBlockBreakingProgress); 16 | 17 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorClientWorld.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.network.PendingUpdateManager; 4 | import net.minecraft.client.world.ClientWorld; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(ClientWorld.class) 9 | public interface AccessorClientWorld { 10 | @Accessor("pendingUpdateManager") 11 | PendingUpdateManager getPendingUpdateManager(); 12 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorEntityVelocityUpS2CPacket.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(EntityVelocityUpdateS2CPacket.class) 8 | public interface AccessorEntityVelocityUpS2CPacket { 9 | 10 | @Accessor("velocityX") 11 | void setVelocityX(int velocityX); 12 | 13 | @Accessor("velocityY") 14 | void setVelocityY(int velocityY); 15 | 16 | @Accessor("velocityZ") 17 | void setVelocityZ(int velocityZ); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorFrustum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the BleachHack distribution (https://github.com/BleachDev/BleachHack/). 3 | * Copyright (c) 2021 Bleach and contributors. 4 | * 5 | * This source code is subject to the terms of the GNU General Public 6 | * License, version 3. If a copy of the GPL was not distributed with this 7 | * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt 8 | */ 9 | package dev.heliosclient.mixin; 10 | 11 | import net.minecraft.client.render.Frustum; 12 | import org.joml.FrustumIntersection; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.gen.Accessor; 15 | 16 | @Mixin(Frustum.class) 17 | public interface AccessorFrustum { 18 | 19 | @Accessor 20 | FrustumIntersection getFrustumIntersection(); 21 | 22 | @Accessor 23 | void setFrustumIntersection(FrustumIntersection vector4f); 24 | 25 | @Accessor(value = "x") 26 | double getX(); 27 | 28 | @Accessor(value = "x") 29 | void setX(double x); 30 | 31 | @Accessor(value = "y") 32 | double getY(); 33 | 34 | @Accessor(value = "y") 35 | void setY(double y); 36 | 37 | @Accessor(value = "z") 38 | double getZ(); 39 | 40 | @Accessor(value = "z") 41 | void setZ(double z); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorKeybind.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.option.KeyBinding; 4 | import net.minecraft.client.util.InputUtil; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(KeyBinding.class) 9 | public interface AccessorKeybind { 10 | 11 | @Accessor("boundKey") 12 | InputUtil.Key getKey(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorMapState.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.entity.player.PlayerEntity; 4 | import net.minecraft.item.map.MapState; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | @Mixin(MapState.class) 12 | public interface AccessorMapState { 13 | @Accessor("updateTrackers") 14 | List getUpdateTrackers(); 15 | 16 | @Accessor("updateTrackersByPlayer") 17 | Map getUpdateTrackersByPlayer(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorMinecraftClient.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.MinecraftClient; 4 | import net.minecraft.client.session.Session; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Mutable; 7 | import org.spongepowered.asm.mixin.gen.Accessor; 8 | import org.spongepowered.asm.mixin.gen.Invoker; 9 | 10 | import java.net.Proxy; 11 | 12 | @Mixin(MinecraftClient.class) 13 | public interface AccessorMinecraftClient { 14 | @Mutable 15 | @Accessor("session") 16 | void setSession(Session session); 17 | 18 | @Invoker("doAttack") 19 | boolean leftClick(); 20 | 21 | @Invoker("doItemUse") 22 | void rightClick(); 23 | 24 | @Accessor("networkProxy") 25 | Proxy getProxy(); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorPlayerEntityModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the BleachHack distribution (https://github.com/BleachDev/BleachHack/). 3 | * Copyright (c) 2021 Bleach and contributors. 4 | * 5 | * This source code is subject to the terms of the GNU General Public 6 | * License, version 3. If a copy of the GPL was not distributed with this 7 | * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt 8 | */ 9 | package dev.heliosclient.mixin; 10 | 11 | import net.minecraft.client.render.entity.model.PlayerEntityModel; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | 14 | @Mixin(PlayerEntityModel.class) 15 | public interface AccessorPlayerEntityModel { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorPlayerInputC2SPacket.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.network.packet.c2s.play.PlayerInputC2SPacket; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(PlayerInputC2SPacket.class) 7 | public interface AccessorPlayerInputC2SPacket { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorPlayerPosition.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.entity.player.PlayerPosition; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(PlayerPosition.class) 8 | public interface AccessorPlayerPosition { 9 | @Accessor("pitch") 10 | void setPitch(float pitch); 11 | 12 | @Accessor("yaw") 13 | void setYaw(float yaw); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorSignEditScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.block.entity.SignBlockEntity; 4 | import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(AbstractSignEditScreen.class) 9 | public interface AccessorSignEditScreen { 10 | @Accessor("blockEntity") 11 | SignBlockEntity getSignEntity(); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/AccessorWorldRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import it.unimi.dsi.fastutil.ints.Int2ObjectMap; 4 | import net.minecraft.client.render.Frustum; 5 | import net.minecraft.client.render.WorldRenderer; 6 | import net.minecraft.entity.player.BlockBreakingInfo; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | 10 | @Mixin(WorldRenderer.class) 11 | public interface AccessorWorldRenderer { 12 | 13 | @Accessor 14 | Frustum getFrustum(); 15 | 16 | @Accessor 17 | void setFrustum(Frustum frustum); 18 | 19 | 20 | @Accessor("blockBreakingInfos") 21 | Int2ObjectMap getBlockBreakingInfos(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/ChunkOcclusionGraphBuilderMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.render.Xray; 5 | import net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder; 6 | import net.minecraft.util.math.BlockPos; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(ChunkOcclusionDataBuilder.class) 13 | public class ChunkOcclusionGraphBuilderMixin { 14 | @Inject(at = @At("HEAD"), method = "markClosed(Lnet/minecraft/util/math/BlockPos;)V", cancellable = true) 15 | private void onMarkClosed(BlockPos pos, CallbackInfo ci) { 16 | if (ModuleManager.get(Xray.class).isActive()) { 17 | ci.cancel(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/ItemEntityRendererMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.entity.ItemPhysicsEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.client.render.VertexConsumerProvider; 6 | import net.minecraft.client.render.entity.ItemEntityRenderer; 7 | import net.minecraft.client.render.entity.state.ItemEntityRenderState; 8 | import net.minecraft.client.util.math.MatrixStack; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(ItemEntityRenderer.class) 15 | public abstract class ItemEntityRendererMixin { 16 | @Inject(method = "render(Lnet/minecraft/client/render/entity/state/ItemEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At("HEAD"), cancellable = true) 17 | private void render(ItemEntityRenderState itemEntityRenderState, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) { 18 | if (EventManager.postEvent(new ItemPhysicsEvent(itemEntityRenderState, i, matrixStack, vertexConsumerProvider)).isCanceled()) { 19 | ci.cancel(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinAbstractBlockState.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | 4 | import dev.heliosclient.managers.ModuleManager; 5 | import dev.heliosclient.module.modules.render.Xray; 6 | import net.minecraft.block.AbstractBlock; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.BlockView; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | @Mixin(AbstractBlock.AbstractBlockState.class) 15 | public abstract class MixinAbstractBlockState { 16 | 17 | @Inject(at = @At("TAIL"), method = "getAmbientOcclusionLightLevel", cancellable = true) 18 | private void setAmbientOcclusionLightLevel(BlockView world, BlockPos pos, CallbackInfoReturnable cir) { 19 | if (ModuleManager.get(Xray.class).isActive()) { 20 | cir.setReturnValue(1f); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinBeaconBlockEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | import dev.heliosclient.managers.ModuleManager; 3 | import dev.heliosclient.module.modules.render.NoRender; 4 | import net.minecraft.block.entity.BeaconBlockEntity; 5 | import net.minecraft.client.render.VertexConsumerProvider; 6 | import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer; 7 | import net.minecraft.client.util.math.MatrixStack; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(BeaconBlockEntityRenderer.class) 14 | public abstract class MixinBeaconBlockEntityRenderer { 15 | @Inject(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II)V", at = @At("HEAD"), cancellable = true) 16 | private void $onRender(BeaconBlockEntity beaconBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j, CallbackInfo info) { 17 | if ( NoRender.get().noBeaconBeam.value && NoRender.get().isActive()) info.cancel(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinBlockEntityRenderDispatcher.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | 4 | import dev.heliosclient.managers.ModuleManager; 5 | import dev.heliosclient.module.modules.render.Xray; 6 | import dev.heliosclient.util.blocks.BlockUtils; 7 | import net.minecraft.block.Block; 8 | import net.minecraft.block.entity.BlockEntity; 9 | import net.minecraft.client.render.VertexConsumerProvider; 10 | import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; 11 | import net.minecraft.client.util.math.MatrixStack; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | @Mixin(BlockEntityRenderDispatcher.class) 18 | public abstract class MixinBlockEntityRenderDispatcher { 19 | @Inject(at = @At("HEAD"), method = "render(Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;)V", cancellable = true) 20 | private void render(E blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo ci) { 21 | Block block = BlockUtils.getBlock(blockEntity.getPos()); 22 | 23 | Xray xray = ModuleManager.get(Xray.class); 24 | if (xray.isActive() && !xray.shouldXray(block)) { 25 | ci.cancel(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinBlockModelRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.client.render.block.BlockModelRenderer; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(BlockModelRenderer.class) 7 | public abstract class MixinBlockModelRenderer { 8 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinBossBarHud.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.module.modules.render.NoRender; 4 | import net.minecraft.client.gui.hud.BossBarHud; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(BossBarHud.class) 11 | public abstract class MixinBossBarHud { 12 | @Inject(method = "render", at = @At("HEAD"), cancellable = true) 13 | private void onRender(CallbackInfo info) { 14 | if (NoRender.get().isActive() && NoRender.get().noBossBar.value) info.cancel(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinCamera.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.render.FreeLook; 5 | import net.minecraft.client.render.Camera; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Shadow; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.ModifyArgs; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | import org.spongepowered.asm.mixin.injection.invoke.arg.Args; 12 | 13 | @Mixin(Camera.class) 14 | public abstract class MixinCamera { 15 | 16 | @Shadow protected abstract void moveBy(float f, float g, float h); 17 | 18 | @Shadow protected abstract float clipToSpace(float f); 19 | 20 | @ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V")) 21 | private void updateSetRotation(Args args) { 22 | FreeLook freeLook = ModuleManager.get(FreeLook.class); 23 | 24 | if (freeLook != null && freeLook.isActive()) { 25 | args.set(0, freeLook.cameraYaw); 26 | args.set(1, freeLook.cameraPitch); 27 | } 28 | } 29 | 30 | @Redirect(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;moveBy(FFF)V")) 31 | private void redirectUpdateMoveBy(Camera instance, float f, float g, float h) { 32 | FreeLook freeLook = ModuleManager.get(FreeLook.class); 33 | this.moveBy(-this.clipToSpace(freeLook.isActive() ? freeLook.getDistanceFromPlayer() : 4.0F), 0.0F, 0.0F); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinChatScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.chat.ChatTweaks; 5 | import net.minecraft.client.gui.screen.ChatScreen; 6 | import net.minecraft.client.gui.widget.TextFieldWidget; 7 | import org.apache.commons.lang3.StringUtils; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | @Mixin(value = ChatScreen.class, priority = 100) 16 | public abstract class MixinChatScreen { 17 | @Shadow 18 | protected TextFieldWidget chatField; 19 | 20 | @Inject(method = "init", at = @At(value = "RETURN")) 21 | private void onInit(CallbackInfo info) { 22 | if (ModuleManager.get(ChatTweaks.class).longerChatBox.value && ModuleManager.get(ChatTweaks.class).isActive()) { 23 | chatField.setMaxLength(Integer.MAX_VALUE); 24 | } 25 | } 26 | 27 | @Inject(method = "normalize", at = @At(value = "HEAD"), cancellable = true) 28 | private void onNormalizeChatMessage(String chatText, CallbackInfoReturnable cir) { 29 | if (ModuleManager.get(ChatTweaks.class).longerChatBox.value && ModuleManager.get(ChatTweaks.class).isActive()) { 30 | cir.setReturnValue(StringUtils.normalizeSpace(chatText.trim())); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinCobwebBlock.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.module.modules.movement.NoSlow; 4 | import net.minecraft.block.BlockState; 5 | import net.minecraft.block.CobwebBlock; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | import static dev.heliosclient.util.render.Renderer3D.mc; 15 | 16 | 17 | @Mixin(CobwebBlock.class) 18 | public class MixinCobwebBlock { 19 | @Inject(method = "onEntityCollision", at = @At("HEAD"), cancellable = true) 20 | private void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity, CallbackInfo info) { 21 | if (entity == mc.player && NoSlow.get().cobWebs.value && NoSlow.get().isActive()) info.cancel(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinConnectScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.client.ServerConnectHeadEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.gui.screen.Screen; 7 | import net.minecraft.client.gui.screen.multiplayer.ConnectScreen; 8 | import net.minecraft.client.network.CookieStorage; 9 | import net.minecraft.client.network.ServerAddress; 10 | import net.minecraft.client.network.ServerInfo; 11 | import net.minecraft.text.Text; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | @Mixin(ConnectScreen.class) 18 | public abstract class MixinConnectScreen extends Screen { 19 | protected MixinConnectScreen(Text title) { 20 | super(title); 21 | } 22 | 23 | @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/multiplayer/ConnectScreen;connect(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;Lnet/minecraft/client/network/CookieStorage;)V"), method = "connect(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;ZLnet/minecraft/client/network/CookieStorage;)V") 24 | private static void onConnect(Screen screen, MinecraftClient client, ServerAddress address, ServerInfo info, boolean quickPlay, CookieStorage cookieStorage, CallbackInfo ci) { 25 | EventManager.postEvent(new ServerConnectHeadEvent(info, address)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinCrashReport.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.managers.ModuleManager; 5 | import net.minecraft.util.crash.CrashReport; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(CrashReport.class) 12 | public abstract class MixinCrashReport { 13 | 14 | //Save our config when a crash occurs via the create method. 15 | @Inject(method = "create", at = @At("HEAD")) 16 | private static void onCreateCrashReport(Throwable cause, String title, CallbackInfoReturnable cir) { 17 | CrashReport report = cir.getReturnValue(); 18 | 19 | 20 | //Display details of HeliosClient 21 | if(report != null) { 22 | if(HeliosClient.CONFIG != null && HeliosClient.CONFIG.nullCheck()) { 23 | HeliosClient.saveConfigHook(); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinEntityRenderDispatcher.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import com.llamalad7.mixinextras.injector.ModifyExpressionValue; 4 | import dev.heliosclient.system.mixininterface.IEntityRenderState; 5 | import net.minecraft.client.render.VertexConsumerProvider; 6 | import net.minecraft.client.render.entity.EntityRenderDispatcher; 7 | import net.minecraft.client.render.entity.EntityRenderer; 8 | import net.minecraft.client.render.entity.state.EntityRenderState; 9 | import net.minecraft.client.util.math.MatrixStack; 10 | import net.minecraft.entity.Entity; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | 14 | @Mixin(EntityRenderDispatcher.class) 15 | public class MixinEntityRenderDispatcher { 16 | // Update IEntityRenderState 17 | @ModifyExpressionValue(method = "render(Lnet/minecraft/entity/Entity;DDDFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/EntityRenderer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderer;getAndUpdateRenderState(Lnet/minecraft/entity/Entity;F)Lnet/minecraft/client/render/entity/state/EntityRenderState;")) 18 | private S render$getAndUpdateRenderState(S state, E entity, double x, double y, double z, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, EntityRenderer renderer) { 19 | ((IEntityRenderState) state).helios$setEntity(entity); 20 | return state; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinEntityRenderState.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.system.mixininterface.IEntityRenderState; 4 | import net.minecraft.client.render.entity.state.EntityRenderState; 5 | import net.minecraft.entity.Entity; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Unique; 8 | 9 | @Mixin(EntityRenderState.class) 10 | public abstract class MixinEntityRenderState implements IEntityRenderState { 11 | 12 | @Unique 13 | private Entity entity; 14 | 15 | @Override 16 | public Entity helios$getEntity() { 17 | return entity; 18 | } 19 | 20 | @Override 21 | public void helios$setEntity(Entity entity) { 22 | this.entity = entity; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.render.EntityLabelRenderEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import dev.heliosclient.system.mixininterface.IEntityRenderState; 6 | import net.minecraft.client.render.VertexConsumerProvider; 7 | import net.minecraft.client.render.entity.EntityRenderer; 8 | import net.minecraft.client.render.entity.state.EntityRenderState; 9 | import net.minecraft.client.util.math.MatrixStack; 10 | import net.minecraft.entity.Entity; 11 | import net.minecraft.text.Text; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | @Mixin(EntityRenderer.class) 18 | public class MixinEntityRenderer { 19 | 20 | @Inject(at = @At("HEAD"), 21 | method = "renderLabelIfPresent", 22 | cancellable = true) 23 | private void onRenderLabelIfPresent(S state, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) { 24 | if (EventManager.postEvent(EntityLabelRenderEvent.get(((IEntityRenderState)state).helios$getEntity(),state, text, matrices, vertexConsumers, light)).isCanceled()) { 25 | ci.cancel(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinHandledScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.misc.InventoryTweaks; 5 | import dev.heliosclient.system.HeliosExecutor; 6 | import net.minecraft.client.gui.screen.Screen; 7 | import net.minecraft.client.gui.screen.ingame.HandledScreen; 8 | import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider; 9 | import net.minecraft.client.gui.widget.ButtonWidget; 10 | import net.minecraft.screen.ScreenHandler; 11 | import net.minecraft.text.Text; 12 | import org.spongepowered.asm.mixin.Final; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.Shadow; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | 19 | import static dev.heliosclient.util.player.InventoryUtils.moveItemQuickMove; 20 | 21 | @Mixin(HandledScreen.class) 22 | public abstract class MixinHandledScreen extends Screen implements ScreenHandlerProvider { 23 | @Shadow 24 | protected int x; 25 | @Shadow 26 | protected int y; 27 | @Shadow 28 | @Final 29 | protected T handler; 30 | 31 | public MixinHandledScreen(Text title) { 32 | super(title); 33 | } 34 | 35 | @Shadow 36 | public abstract void close(); 37 | 38 | @Shadow 39 | public abstract T getScreenHandler(); 40 | 41 | @Inject(method = "init", at = @At("TAIL")) 42 | private void onInit(CallbackInfo info) { 43 | InventoryTweaks invTweaks = ModuleManager.get(InventoryTweaks.class); 44 | 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinHorseEntity.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.movement.EntityControl; 5 | import net.minecraft.entity.passive.AbstractHorseEntity; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(AbstractHorseEntity.class) 12 | public abstract class MixinHorseEntity { 13 | 14 | @Inject(method = "isSaddled", at = @At(value = "TAIL"), cancellable = true) 15 | public void setSaddled(CallbackInfoReturnable cir) { 16 | if (ModuleManager.get(EntityControl.class).isActive()) cir.setReturnValue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinInGameOverlayRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.module.modules.render.NoRender; 4 | import net.minecraft.client.MinecraftClient; 5 | import net.minecraft.client.gui.hud.InGameOverlayRenderer; 6 | import net.minecraft.client.render.VertexConsumerProvider; 7 | import net.minecraft.client.util.math.MatrixStack; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(InGameOverlayRenderer.class) 14 | public class MixinInGameOverlayRenderer { 15 | 16 | @Inject(method = "renderFireOverlay", at = @At("HEAD"), cancellable = true) 17 | private static void onRenderFireOverlay(MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo ci) { 18 | if (NoRender.get().isActive() && NoRender.get().noFire.value) ci.cancel(); 19 | } 20 | 21 | @Inject(method = "renderUnderwaterOverlay", at = @At("HEAD"), cancellable = true) 22 | private static void onRenderUnderwaterOverlay(MinecraftClient client, MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo ci) { 23 | if (NoRender.get().isActive() && NoRender.get().noLiquid.value) ci.cancel(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinLightmapTextureManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.render.Fullbright; 5 | import dev.heliosclient.module.modules.render.Xray; 6 | import net.minecraft.client.render.LightmapTextureManager; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 10 | 11 | @Mixin(LightmapTextureManager.class) 12 | public class MixinLightmapTextureManager { 13 | 14 | @ModifyVariable(method = "update", at = @At(value = "STORE", ordinal = 0), ordinal = 1) 15 | private float modifyGamma(float originalGamma) { 16 | if (ModuleManager.get(Fullbright.class).isActive()) { 17 | return ModuleManager.get(Fullbright.class).getGamma(originalGamma); 18 | } 19 | 20 | if (ModuleManager.get(Xray.class).isActive()) { 21 | return 5.0f; 22 | } 23 | 24 | return originalGamma; 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinMinecraftServer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.TickEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.server.MinecraftServer; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | 12 | @Mixin(MinecraftServer.class) 13 | public abstract class MixinMinecraftServer { 14 | @Inject(method = "tick", at = @At(value = "HEAD"), cancellable = true) 15 | public void onTick(CallbackInfo ci) { 16 | TickEvent event = new TickEvent.WORLD(); 17 | EventManager.postEvent(event); 18 | if (event.isCanceled()) { 19 | ci.cancel(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinPacketByteBuf.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.world.AntiBookBan; 5 | import io.netty.buffer.ByteBuf; 6 | import io.netty.buffer.Unpooled; 7 | import net.minecraft.network.PacketByteBuf; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.ModifyArg; 11 | 12 | @Mixin(PacketByteBuf.class) 13 | public class MixinPacketByteBuf { 14 | 15 | @ModifyArg(method = "readNbt()Lnet/minecraft/nbt/NbtCompound;", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/PacketByteBuf;readNbt(Lio/netty/buffer/ByteBuf;)Lnet/minecraft/nbt/NbtCompound;")) 16 | private ByteBuf increaseMaxBytes(ByteBuf buf) { 17 | return ModuleManager.get(AntiBookBan.class).isActive() ? Unpooled.buffer(Integer.MAX_VALUE) : buf; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinParticleManager.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.world.ParticleEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.client.particle.Particle; 6 | import net.minecraft.client.particle.ParticleManager; 7 | import net.minecraft.particle.ParticleEffect; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 12 | 13 | @Mixin(ParticleManager.class) 14 | public abstract class MixinParticleManager { 15 | 16 | @Inject(method = "addParticle(Lnet/minecraft/particle/ParticleEffect;DDDDDD)Lnet/minecraft/client/particle/Particle;", at = @At("HEAD"), cancellable = true) 17 | private void onAddParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ, CallbackInfoReturnable cir) { 18 | ParticleEvent event = new ParticleEvent(parameters, x, y, z); 19 | EventManager.postEvent(event); 20 | if (event.isCanceled()) { 21 | cir.cancel(); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinPlayerEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.util.player.RotationUtils; 4 | import net.minecraft.client.network.AbstractClientPlayerEntity; 5 | import net.minecraft.client.render.entity.PlayerEntityRenderer; 6 | import net.minecraft.client.render.entity.state.PlayerEntityRenderState; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import static dev.heliosclient.util.render.Renderer3D.mc; 13 | 14 | @Mixin(PlayerEntityRenderer.class) 15 | public abstract class MixinPlayerEntityRenderer { 16 | 17 | //ClientSide rotation preview in 3rd person 18 | //From Meteor mixin 19 | @Inject(method = "updateRenderState(Lnet/minecraft/client/network/AbstractClientPlayerEntity;Lnet/minecraft/client/render/entity/state/PlayerEntityRenderState;F)V", at = @At("RETURN")) 20 | private void updateRenderState$rotations(AbstractClientPlayerEntity entity, PlayerEntityRenderState playerEntityRenderState, float f, CallbackInfo ci) { 21 | if (entity.equals(mc.player) && RotationUtils.timerSinceLastRotation.getElapsedTicks() < 10) { 22 | playerEntityRenderState.bodyYaw = RotationUtils.serverYaw; 23 | playerEntityRenderState.pitch = RotationUtils.serverPitch; 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinPlayerInput.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.event.events.player.PlayerJumpEvent; 5 | import dev.heliosclient.managers.EventManager; 6 | import net.minecraft.util.PlayerInput; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | @Mixin(PlayerInput.class) 13 | public abstract class MixinPlayerInput { 14 | @Inject(method = "jump", at = @At("HEAD"), cancellable = true) 15 | protected void onJump(CallbackInfoReturnable cir) { 16 | if(HeliosClient.MC.player != null) { 17 | PlayerJumpEvent event = new PlayerJumpEvent(HeliosClient.MC.player); 18 | EventManager.postEvent(event); 19 | if (event.isCanceled()) cir.cancel(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinPlayerInventory.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.entity.player.PlayerInventory; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(PlayerInventory.class) 7 | public abstract class MixinPlayerInventory { 8 | 9 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinRenderTickCounter.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.world.Timer; 5 | import net.minecraft.client.render.RenderTickCounter; 6 | import org.objectweb.asm.Opcodes; 7 | import org.spongepowered.asm.mixin.Final; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | @Mixin(RenderTickCounter.Dynamic.class) 15 | public abstract class MixinRenderTickCounter { 16 | @Shadow 17 | private float lastFrameDuration; 18 | 19 | @Shadow private long prevTimeMillis; 20 | 21 | @Shadow @Final private float tickTime; 22 | 23 | @Inject(method = "beginRenderTick(J)I", at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/RenderTickCounter$Dynamic;prevTimeMillis:J", opcode = Opcodes.PUTFIELD)) 24 | private void onBeginRenderTick(long timeMillis, CallbackInfoReturnable cir) { 25 | this.lastFrameDuration = (float) ((float)(timeMillis - this.prevTimeMillis) / tickTime * ModuleManager.get(Timer.class).getTimerMultiplier()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.client.ScreenResizeEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.gui.screen.Screen; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(Screen.class) 14 | public abstract class MixinScreen{ 15 | 16 | @Shadow public int width; 17 | 18 | @Shadow public int height; 19 | 20 | @Inject(method = "resize", at = @At(value = "HEAD")) 21 | private void onResize(MinecraftClient client, int width, int height, CallbackInfo ci) { 22 | EventManager.postEvent(new ScreenResizeEvent(this.width, this.height,width,height)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinServerPlayNetworkHandler.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import com.mojang.brigadier.ParseResults; 4 | import dev.heliosclient.HeliosClient; 5 | import dev.heliosclient.event.events.player.DisconnectEvent; 6 | import dev.heliosclient.managers.EventManager; 7 | import net.minecraft.network.DisconnectionInfo; 8 | import net.minecraft.server.command.ServerCommandSource; 9 | import net.minecraft.server.network.ServerPlayNetworkHandler; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Shadow; 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(ServerPlayNetworkHandler.class) 17 | public abstract class MixinServerPlayNetworkHandler { 18 | @Shadow 19 | protected abstract ParseResults parse(String command); 20 | 21 | @Inject(method = "onDisconnected", at = @At("RETURN"), cancellable = true) 22 | private void onDisconnected(DisconnectionInfo info, CallbackInfo ci) { 23 | DisconnectEvent event = new DisconnectEvent(HeliosClient.MC.player); 24 | EventManager.postEvent(event); 25 | if (event.isCanceled()) { 26 | ci.cancel(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinServerPlayerEntity.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.events.player.ItemPickupEvent; 4 | import dev.heliosclient.managers.EventManager; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.ItemEntity; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.server.network.ServerPlayerEntity; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(ServerPlayerEntity.class) 15 | public abstract class MixinServerPlayerEntity { 16 | 17 | @Inject(method = "sendPickup", at = @At("HEAD"), cancellable = true) 18 | private void onItemPickup(Entity item, int count, CallbackInfo info) { 19 | if (item instanceof ItemEntity itemEntity) { 20 | ItemStack stack = itemEntity.getStack(); 21 | ItemPickupEvent event = new ItemPickupEvent(stack); 22 | EventManager.postEvent(event); 23 | if (event.isCanceled()) { 24 | info.cancel(); 25 | } 26 | } 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinSharedConstants.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.SharedConstants; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(SharedConstants.class) 7 | public abstract class MixinSharedConstants { 8 | 9 | /* 10 | @ModifyReturnValue(method = "", at = @At("RETURN")) 11 | private static boolean isValidChar(boolean original) { 12 | if (ModuleManager.get(ChatTweaks.class).noKeyRestriction()) return true; 13 | return original; 14 | } 15 | 16 | */ 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinSlimeBlock.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.module.modules.movement.NoSlow; 4 | import net.minecraft.block.BlockState; 5 | import net.minecraft.block.SlimeBlock; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | import static dev.heliosclient.util.render.Renderer3D.mc; 15 | 16 | @Mixin(SlimeBlock.class) 17 | public abstract class MixinSlimeBlock { 18 | @Inject(method = "onSteppedOn", at = @At("HEAD"), cancellable = true) 19 | private void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity, CallbackInfo info) { 20 | if (entity == mc.player && NoSlow.get().slimeBlocks.value && NoSlow.get().isActive()) info.cancel(); 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinVec3d.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.system.mixininterface.IVec3d; 4 | import net.minecraft.util.math.Vec3d; 5 | import org.spongepowered.asm.mixin.Final; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Mutable; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | 10 | @Mixin(Vec3d.class) 11 | public class MixinVec3d implements IVec3d { 12 | @Shadow 13 | @Final 14 | @Mutable 15 | public double x; 16 | @Shadow 17 | @Final 18 | @Mutable 19 | public double y; 20 | @Shadow 21 | @Final 22 | @Mutable 23 | public double z; 24 | 25 | @Override 26 | public void heliosClient$set(double x, double y, double z) { 27 | this.x = x; 28 | this.y = y; 29 | this.z = z; 30 | } 31 | 32 | @Override 33 | public void heliosClient$setY(double y) { 34 | this.y = y; 35 | } 36 | 37 | @Override 38 | public void heliosClient$setXZ(double x, double z) { 39 | this.x = x; 40 | this.z = z; 41 | } 42 | 43 | @Override 44 | public void heliosClient$setX(double x) { 45 | this.x = x; 46 | } 47 | 48 | @Override 49 | public void heliosClient$setZ(double z) { 50 | this.z = z; 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinWorld.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import net.minecraft.world.World; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(World.class) 7 | public abstract class MixinWorld {} 8 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MixinWorldBorder.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.managers.ModuleManager; 4 | import dev.heliosclient.module.modules.world.Collisions; 5 | import net.minecraft.world.border.WorldBorder; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(WorldBorder.class) 12 | public abstract class MixinWorldBorder { 13 | @Inject(method = "canCollide", at = @At("HEAD"), cancellable = true) 14 | private void canCollide(CallbackInfoReturnable info) { 15 | if (ModuleManager.get(Collisions.class).ignoreBorder()) info.setReturnValue(false); 16 | } 17 | 18 | @Inject(method = "contains(Lnet/minecraft/util/math/BlockPos;)Z", at = @At("HEAD"), cancellable = true) 19 | private void contains(CallbackInfoReturnable info) { 20 | if (ModuleManager.get(Collisions.class).ignoreBorder()) info.setReturnValue(true); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/MultiplayerScreenMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.ui.altmanager.AltManagerScreen; 5 | import net.minecraft.client.gui.screen.Screen; 6 | import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen; 7 | import net.minecraft.client.gui.widget.ButtonWidget; 8 | import net.minecraft.text.Text; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Unique; 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 | @Mixin(MultiplayerScreen.class) 16 | public abstract class MultiplayerScreenMixin extends Screen { 17 | protected MultiplayerScreenMixin(Text title) { 18 | super(title); 19 | } 20 | 21 | @Inject(at = @At("TAIL"), method = "init") 22 | private void altManagerButton(CallbackInfo callbackInfo) { 23 | this.addDrawableChild(ButtonWidget.builder(Text.literal("Alt Manager"), this::gotoAltManagerScreen) 24 | .position(this.width - 102, 2) 25 | .size(100, 20) 26 | .build()); 27 | } 28 | 29 | @Unique 30 | private void gotoAltManagerScreen(ButtonWidget button) { 31 | HeliosClient.MC.setScreen(AltManagerScreen.INSTANCE); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/PlayerInteractEntityC2SPacketMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.managers.ModuleManager; 5 | import dev.heliosclient.module.modules.movement.AutoSneak; 6 | import dev.heliosclient.system.mixininterface.IPlayerInteractEntityC2SPacket; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket; 9 | import org.spongepowered.asm.mixin.Final; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Shadow; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 14 | 15 | 16 | @Mixin(PlayerInteractEntityC2SPacket.class) 17 | public abstract class PlayerInteractEntityC2SPacketMixin implements IPlayerInteractEntityC2SPacket { 18 | @Shadow 19 | @Final 20 | private PlayerInteractEntityC2SPacket.InteractTypeHandler type; 21 | 22 | @Shadow @Final private int entityId; 23 | 24 | @Override 25 | @SuppressWarnings("all") 26 | public PlayerInteractEntityC2SPacket.InteractType getType() { 27 | return type.getType(); 28 | } 29 | 30 | @Override 31 | public Entity getEntity() { 32 | return HeliosClient.MC.world.getEntityById(entityId); 33 | } 34 | 35 | @ModifyVariable(method = "(IZLnet/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractTypeHandler;)V", at = @At("HEAD"), ordinal = 0, argsOnly = true) 36 | private static boolean modifySneaking(boolean sneaking) { 37 | return (ModuleManager.get(AutoSneak.class).isActive() && ModuleManager.get(AutoSneak.class).packet.value) || sneaking; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/PlayerManagerMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.event.Event; 4 | import dev.heliosclient.event.events.player.DisconnectEvent; 5 | import dev.heliosclient.managers.EventManager; 6 | import net.minecraft.server.PlayerManager; 7 | import net.minecraft.server.network.ServerPlayerEntity; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(PlayerManager.class) 14 | public abstract class PlayerManagerMixin { 15 | @Inject(method = "remove", at = @At("TAIL"), cancellable = true) 16 | private void onDisconnect(ServerPlayerEntity player, CallbackInfo ci) { 17 | Event event = new DisconnectEvent(player); 18 | if (EventManager.postEvent(event).isCanceled()) 19 | ci.cancel(); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/mixin/SimpleOptionMixin.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.mixin; 2 | 3 | import dev.heliosclient.system.mixininterface.ISimpleOption; 4 | import net.minecraft.client.MinecraftClient; 5 | import net.minecraft.client.option.SimpleOption; 6 | import org.spongepowered.asm.mixin.Final; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | 10 | import java.util.Objects; 11 | import java.util.function.Consumer; 12 | 13 | @Mixin(SimpleOption.class) 14 | public abstract class SimpleOptionMixin implements ISimpleOption { 15 | @Shadow 16 | T value; 17 | @Shadow 18 | @Final 19 | private Consumer changeCallback; 20 | 21 | @Override 22 | public void heliosClient$setValueUnrestricted(T object) { 23 | if (!MinecraftClient.getInstance().isRunning()) { 24 | this.value = object; 25 | return; 26 | } 27 | if (!Objects.equals(this.value, object)) { 28 | this.value = object; 29 | this.changeCallback.accept(this.value); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/Categories.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module; 2 | 3 | import dev.heliosclient.addon.AddonManager; 4 | import dev.heliosclient.addon.HeliosAddon; 5 | import dev.heliosclient.managers.CategoryManager; 6 | 7 | public class Categories { 8 | public static final Category MISC = new Category("Misc", '\uF156'); 9 | public static final Category WORLD = new Category("World", '\uF198'); 10 | public static final Category COMBAT = new Category("Combat", '\uEAC4'); 11 | public static final Category MOVEMENT = new Category("Movement", '\uF16A'); 12 | public static final Category PLAYER = new Category("Player", '\uEA08'); 13 | public static final Category SEARCH = new Category("Search", '\uEA17'); 14 | public static final Category RENDER = new Category("Render", '\uF164'); 15 | 16 | public static void registerCategories() { 17 | CategoryManager.register(MISC); 18 | CategoryManager.register(WORLD); 19 | CategoryManager.register(MOVEMENT); 20 | CategoryManager.register(COMBAT); 21 | CategoryManager.register(PLAYER); 22 | CategoryManager.register(RENDER); 23 | CategoryManager.register(SEARCH); 24 | 25 | AddonManager.HELIOS_ADDONS.forEach(HeliosAddon::registerCategories); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/Category.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module; 2 | 3 | public class Category { 4 | public String name; 5 | public char icon; 6 | 7 | 8 | public Category(String name) { 9 | this.name = name; 10 | } 11 | 12 | public Category(String name, char icon) { 13 | this.name = name; 14 | this.icon = icon; 15 | } 16 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/AutoReconnect.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.client.ServerConnectHeadEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import dev.heliosclient.module.settings.DoubleSetting; 8 | import dev.heliosclient.module.settings.SettingGroup; 9 | import net.minecraft.client.network.ServerInfo; 10 | 11 | public class AutoReconnect extends Module_ { 12 | public ServerInfo lastConnection; 13 | SettingGroup sgGeneral = new SettingGroup("General"); 14 | public DoubleSetting delay = sgGeneral.add(new DoubleSetting.Builder() 15 | .name("Reconnect delay") 16 | .description("Reconnect delay (in seconds)") 17 | .min(0) 18 | .max(120) 19 | .value(5d) 20 | .defaultValue(5d) 21 | .roundingPlace(1) 22 | .onSettingChange(this) 23 | .build() 24 | ); 25 | 26 | 27 | public AutoReconnect() { 28 | super("AutoReconnect", "Automatically connects to the last disconnected server", Categories.MISC); 29 | addSettingGroup(sgGeneral); 30 | 31 | addQuickSetting(delay); 32 | } 33 | 34 | @SubscribeEvent 35 | public void onConnect(ServerConnectHeadEvent event) { 36 | lastConnection = event.info; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/Fucker.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.event.SubscribeEvent; 5 | import dev.heliosclient.event.events.TickEvent; 6 | import dev.heliosclient.module.Categories; 7 | import dev.heliosclient.module.Module_; 8 | import dev.heliosclient.util.blocks.BlockUtils; 9 | import dev.heliosclient.util.entity.EntityUtils; 10 | import net.minecraft.util.math.BlockPos; 11 | 12 | /** 13 | * PlaceHolder / Incomplete 14 | */ 15 | public class Fucker extends Module_ { 16 | public Fucker() { 17 | super("Fucker", "Does not break anything", Categories.MISC); 18 | } 19 | 20 | @SubscribeEvent 21 | public void onTick(TickEvent.CLIENT.PRE event) { 22 | if(!HeliosClient.shouldUpdate()) return; 23 | 24 | BlockPos bedPos = EntityUtils.getNearestBed(mc.world, mc.player, (int) mc.player.getBlockInteractionRange()); 25 | 26 | if (bedPos == null) return; 27 | 28 | BlockUtils.breakBlock(bedPos, true); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/InventoryTweaks.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.BooleanSetting; 6 | import dev.heliosclient.module.settings.DoubleSetting; 7 | import dev.heliosclient.module.settings.SettingGroup; 8 | 9 | public class InventoryTweaks extends Module_ { 10 | private final SettingGroup sgGeneral = new SettingGroup("General"); 11 | private final SettingGroup sgAutomation = new SettingGroup("Automation"); 12 | 13 | public BooleanSetting showStealDiscardButtons = sgAutomation.add(new BooleanSetting.Builder() 14 | .name("Show Steal/Discard Buttons") 15 | .description("Shows steal and discard buttons in container screens") 16 | .defaultValue(true) 17 | .onSettingChange(this) 18 | .build() 19 | ); 20 | public DoubleSetting stealDiscardDelay = sgAutomation.add(new DoubleSetting.Builder() 21 | .name("StealDiscardDelay") 22 | .description("Delay between moving each item in milliseconds") 23 | .min(0) 24 | .max(1500) 25 | .roundingPlace(0) 26 | .defaultValue(250d) 27 | .onSettingChange(this) 28 | .build() 29 | ); 30 | 31 | public InventoryTweaks() { 32 | super("InventoryTweaks","Tweaks various parts of your inventory", Categories.MISC); 33 | addSettingGroup(sgGeneral); 34 | addSettingGroup(sgAutomation); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/NoNarrator.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.client.option.NarratorMode; 8 | 9 | public class NoNarrator extends Module_ { 10 | public NoNarrator() { 11 | super("NoNarrator", "Disables narrator from the game and prevents it from interrupting you", Categories.MISC); 12 | } 13 | 14 | @SubscribeEvent 15 | public void onTick(TickEvent.CLIENT event) { 16 | mc.options.getNarrator().setValue(NarratorMode.OFF); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/NoSwing.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.DropDownSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | 8 | import java.util.List; 9 | 10 | public class NoSwing extends Module_ { 11 | SettingGroup sgGeneral = new SettingGroup("General"); 12 | public DropDownSetting swingMode = sgGeneral.add(new DropDownSetting.Builder() 13 | .name("Swing Mode") 14 | .description("Which hand to swing") 15 | .value(List.of(SwingMode.values())) 16 | .defaultValue(List.of(SwingMode.values())) 17 | .defaultListOption(SwingMode.None) 18 | .addOptionToolTip("Sets your hand swings to always main hand") 19 | .addOptionToolTip("Sets your hand swings to always offhand hand") 20 | .addOptionToolTip("Sets your hand swings to neither of the hand (only visually)") 21 | .addOptionToolTip("Sets your hand swings to neither of the hand (no packets to server as well)") 22 | .onSettingChange(this) 23 | .build() 24 | ); 25 | 26 | public NoSwing() { 27 | super("NoSwing", "Modifies client and server hand swings", Categories.MISC); 28 | addSettingGroup(sgGeneral); 29 | 30 | addQuickSettings(sgGeneral.getSettings()); 31 | 32 | } 33 | 34 | public enum SwingMode { 35 | MainHand, 36 | OffHand, 37 | None, 38 | NoServer, 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/ScriptModule.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | 10 | //Todo: LuaScripts rewrite - Elbe 11 | @Deprecated(forRemoval = true) 12 | public class ScriptModule extends Module_ { 13 | Map MAP = new HashMap<>(); 14 | 15 | public ScriptModule() { 16 | super("Lua-Scripts", "Placeholder to save/load script binds", Categories.MISC); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/misc/SilentClose.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.misc; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.player.PacketEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.network.packet.c2s.play.CloseHandledScreenC2SPacket; 8 | 9 | public class SilentClose extends Module_ { 10 | public SilentClose() { 11 | super("SilentClose", "Silently closes containers to make the server think you are still in a container", Categories.MISC); 12 | } 13 | 14 | @SubscribeEvent 15 | public void onPacketSend(PacketEvent.SEND event) { 16 | if (event.packet instanceof CloseHandledScreenC2SPacket) { 17 | event.setCanceled(true); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/AirJump.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class AirJump extends Module_ { 7 | public AirJump() { 8 | super("AirJump", "Allows you to jump in air", Categories.MOVEMENT); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/AutoJump.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import dev.heliosclient.module.settings.BooleanSetting; 8 | import dev.heliosclient.module.settings.SettingGroup; 9 | 10 | public class AutoJump extends Module_ { 11 | public SettingGroup sgGeneral = new SettingGroup("General"); 12 | 13 | BooleanSetting onlyOnCollision = sgGeneral.add(new BooleanSetting.Builder() 14 | .name("On Horizontal Collision") 15 | .description("Only jumps when you collide with something") 16 | .onSettingChange(this) 17 | .value(false) 18 | .build() 19 | ); 20 | 21 | 22 | public AutoJump() { 23 | super("AutoJump", "Jumps automatically for you", Categories.MOVEMENT); 24 | addSettingGroup(sgGeneral); 25 | addQuickSettings(sgGeneral.getSettings()); 26 | } 27 | 28 | @SubscribeEvent 29 | public void onTick(TickEvent.PLAYER event) { 30 | if(onlyOnCollision.value && !mc.player.horizontalCollision)return; 31 | 32 | if (!mc.player.isOnGround() || mc.player.isSneaking()) return; 33 | 34 | mc.player.jump(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/EntityControl.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class EntityControl extends Module_ { 7 | public EntityControl() { 8 | super("Entity Control", "Allows you to ride entities without the need of a saddle.", Categories.MOVEMENT); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/NoJumpDelay.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class NoJumpDelay extends Module_ { 7 | public NoJumpDelay() { 8 | super("NoJumpDelay", "Removes delay between jumps", Categories.MOVEMENT); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/NoLevitation.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.entity.effect.StatusEffects; 8 | 9 | public class NoLevitation extends Module_ { 10 | public NoLevitation() { 11 | super("No Levitation", "Removes levitation effect", Categories.MOVEMENT); 12 | } 13 | 14 | @SubscribeEvent 15 | public void onTick(TickEvent.PLAYER event) { 16 | if (mc.player.hasStatusEffect(StatusEffects.LEVITATION)) { 17 | mc.player.removeStatusEffect(StatusEffects.LEVITATION); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/Phase.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | 8 | public class Phase extends Module_ { 9 | public Phase() { 10 | super("Phase", "Placeholder module for phase", Categories.MOVEMENT); 11 | } 12 | 13 | @Override 14 | public void onEnable() { 15 | super.onEnable(); 16 | if (mc.player != null) { 17 | mc.player.noClip = true; 18 | } 19 | } 20 | 21 | @SubscribeEvent 22 | public void onTick(TickEvent.PLAYER event) { 23 | mc.player.noClip = true; 24 | mc.player.getAbilities().allowFlying = true; 25 | } 26 | 27 | @Override 28 | public void onDisable() { 29 | super.onDisable(); 30 | if (mc.player != null) { 31 | mc.player.noClip = false; 32 | mc.player.getAbilities().allowFlying = false; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/movement/Slippy.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.movement; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class Slippy extends Module_ { 7 | public Slippy() { 8 | super("Slippy", "Makes you slip on all blocks", Categories.MOVEMENT); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/AutoRespawn.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.event.events.player.PlayerDeathEvent; 6 | import dev.heliosclient.module.Categories; 7 | import dev.heliosclient.module.Module_; 8 | import net.minecraft.client.gui.screen.DeathScreen; 9 | 10 | public class AutoRespawn extends Module_ { 11 | public AutoRespawn() { 12 | super("AutoRespawn", "Automatically respawns on death", Categories.PLAYER); 13 | } 14 | 15 | 16 | @SubscribeEvent 17 | public void onDeath(PlayerDeathEvent event) { 18 | mc.player.requestRespawn(); 19 | 20 | //Prevents the respawn screen from staying up. 21 | mc.execute(() -> mc.setScreen(null)); 22 | } 23 | 24 | @SubscribeEvent 25 | public void onTick(TickEvent.PLAYER event) { 26 | if (mc.currentScreen instanceof DeathScreen) { 27 | mc.player.requestRespawn(); 28 | 29 | //Prevents the respawn screen from staying up. 30 | mc.execute(() -> mc.setScreen(null)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/InventoryCleaner.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import dev.heliosclient.module.settings.SettingGroup; 8 | import dev.heliosclient.module.settings.lists.ItemListSetting; 9 | import dev.heliosclient.util.player.InventoryUtils; 10 | import net.minecraft.item.Item; 11 | import net.minecraft.item.Items; 12 | 13 | public class InventoryCleaner extends Module_ { 14 | SettingGroup sgGeneral = new SettingGroup("General"); 15 | 16 | ItemListSetting items = sgGeneral.add(new ItemListSetting.Builder() 17 | .name("Items") 18 | .description("The items to drop from inventory") 19 | .items(Items.STRING, Items.ROTTEN_FLESH, Items.SPIDER_EYE, Items.BONE) 20 | .build() 21 | ); 22 | 23 | 24 | public InventoryCleaner() { 25 | super("InventoryCleaner", "Removes the given items from your inventory to prevent clogging", Categories.PLAYER); 26 | 27 | addSettingGroup(sgGeneral); 28 | addQuickSettings(sgGeneral.getSettings()); 29 | } 30 | 31 | @SubscribeEvent 32 | public void onTick(TickEvent.PLAYER event) { 33 | for (Item item : items.getSelectedEntries()) { 34 | InventoryUtils.dropAllItems(item); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/NoBreakDelay.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.DoubleSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | 8 | public class NoBreakDelay extends Module_ { 9 | SettingGroup sgGeneral = new SettingGroup("General"); 10 | 11 | public DoubleSetting breakDelay = sgGeneral.add(new DoubleSetting.Builder() 12 | .name("Break Delay") 13 | .description("Modify your break cooldown") 14 | .range(0d, 5d) 15 | .defaultValue(0d) 16 | .value(0d) 17 | .roundingPlace(0) 18 | .build() 19 | ); 20 | 21 | public NoBreakDelay() { 22 | super("NoBreakDelay", "Modifies your breaking cooldown", Categories.PLAYER); 23 | addSettingGroup(sgGeneral); 24 | addQuickSetting(breakDelay); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/NoMiningTrace.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.BooleanSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | import net.minecraft.item.PickaxeItem; 8 | 9 | public class NoMiningTrace extends Module_ { 10 | SettingGroup sgGeneral = new SettingGroup("Settings"); 11 | 12 | BooleanSetting onlyWithPickaxe = sgGeneral.add(new BooleanSetting("Only With pickaxes", "Only works when you are holding a pickaxe", this, true)); 13 | 14 | public NoMiningTrace() { 15 | super("NoMiningTrace", "Allows you to mine through entities", Categories.PLAYER); 16 | addSettingGroup(sgGeneral); 17 | addQuickSetting(onlyWithPickaxe); 18 | } 19 | 20 | public boolean shouldRemoveTrace() { 21 | if (!isActive()) { 22 | return false; 23 | } 24 | if (onlyWithPickaxe.value) { 25 | return mc.player.getMainHandStack().getItem() instanceof PickaxeItem || mc.player.getOffHandStack().getItem() instanceof PickaxeItem; 26 | } 27 | 28 | return true; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/NoRotate.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.player.PacketEvent; 5 | import dev.heliosclient.mixin.AccessorPlayerPosition; 6 | import dev.heliosclient.module.Categories; 7 | import dev.heliosclient.module.Module_; 8 | import net.minecraft.entity.player.PlayerPosition; 9 | import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket; 10 | import net.minecraft.network.packet.s2c.play.PositionFlag; 11 | 12 | public class NoRotate extends Module_ { 13 | public NoRotate() { 14 | super("NoRotate", "Tries to overwrite rotation values sent from server to client", Categories.PLAYER); 15 | } 16 | 17 | @SubscribeEvent(priority = SubscribeEvent.Priority.LOW) 18 | private void onPacketReceive(PacketEvent.RECEIVE event) { 19 | if (event.packet instanceof PlayerPositionLookS2CPacket ppl) { 20 | PlayerPosition position2 = ppl.change(); 21 | AccessorPlayerPosition accessor = (AccessorPlayerPosition) (Object) position2; 22 | assert accessor != null; 23 | accessor.setPitch(mc.player.getPitch()); 24 | accessor.setYaw(mc.player.getYaw()); 25 | ppl.relatives().remove(PositionFlag.X_ROT); 26 | ppl.relatives().remove(PositionFlag.Y_ROT); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/Reach.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.DoubleSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | 8 | public class Reach extends Module_ { 9 | SettingGroup sgGeneral = new SettingGroup("General"); 10 | public DoubleSetting blockReach = sgGeneral.add(new DoubleSetting.Builder() 11 | .name("Block Reach") 12 | .description("Block interaction range") 13 | .onSettingChange(this) 14 | .defaultValue(4.5) 15 | .value(4.5) 16 | .min(0) 17 | .max(10) 18 | .roundingPlace(2) 19 | .build() 20 | ); 21 | public DoubleSetting entityReach = sgGeneral.add(new DoubleSetting.Builder() 22 | .name("Entity Reach") 23 | .description("Entity interaction range") 24 | .onSettingChange(this) 25 | .defaultValue(5d) 26 | .value(5d) 27 | .min(0) 28 | .max(10) 29 | .roundingPlace(2) 30 | .build() 31 | ); 32 | 33 | public Reach() { 34 | super("Reach", "Increase/Decrease your reach", Categories.PLAYER); 35 | addSettingGroup(sgGeneral); 36 | addQuickSettings(sgGeneral.getSettings()); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/TpsSync.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.TickEvent; 5 | import dev.heliosclient.managers.ModuleManager; 6 | import dev.heliosclient.module.Categories; 7 | import dev.heliosclient.module.Module_; 8 | import dev.heliosclient.module.modules.world.Timer; 9 | import dev.heliosclient.system.TickRate; 10 | 11 | public class TpsSync extends Module_ { 12 | 13 | public TpsSync() { 14 | super("TpsSync", "Syncs you and your actions with the server TPS", Categories.PLAYER); 15 | } 16 | @Override 17 | public void onDisable() { 18 | super.onDisable(); 19 | ModuleManager.get(Timer.class).setOverride(Timer.RESET); 20 | } 21 | 22 | @SubscribeEvent 23 | public void onTick(TickEvent.PLAYER event) { 24 | Timer timer = ModuleManager.get(Timer.class); 25 | if (timer.isActive()) return; 26 | 27 | if(TickRate.INSTANCE.getTPS() > 1){ 28 | timer.setOverride(TickRate.INSTANCE.getTPS() / 20f); 29 | }else{ 30 | timer.setOverride(Timer.RESET); 31 | } 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/player/XCarry.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.player; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.player.PacketEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.network.packet.c2s.play.CloseHandledScreenC2SPacket; 8 | 9 | public class XCarry extends Module_ { 10 | public XCarry() { 11 | super("XCarry","eXtra carry in your crafting and other slots", Categories.PLAYER); 12 | } 13 | 14 | @SubscribeEvent 15 | public void onPaketSend(PacketEvent.SEND e) { 16 | if (e.packet instanceof CloseHandledScreenC2SPacket) 17 | e.setCanceled(true); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/render/AspectRatio.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.render; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.DoubleSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | 8 | public class AspectRatio extends Module_ { 9 | SettingGroup sgGeneral = new SettingGroup("General"); 10 | 11 | public DoubleSetting aspectRatio = sgGeneral.add(new DoubleSetting.Builder() 12 | .name("Aspect Ratio") 13 | .description("Ratio of the aspect :hmm:") 14 | .min(0.1) 15 | .max(5.0f) 16 | .defaultValue(1.6) 17 | .roundingPlace(2) 18 | .onSettingChange(this) 19 | .build() 20 | ); 21 | 22 | public DoubleSetting cameraDepth = sgGeneral.add(new DoubleSetting.Builder() 23 | .name("Camera Depth") 24 | .description("Depth of the camera") 25 | .min(-1f) 26 | .max(2f) 27 | .value(0.05d) 28 | .defaultValue(0.05d) 29 | .roundingPlace(2) 30 | .onSettingChange(this) 31 | .build() 32 | ); 33 | 34 | public AspectRatio() { 35 | super("AspectRatio","Customise the aspect ratio of minecraft and camera depth!", Categories.RENDER); 36 | addSettingGroup(sgGeneral); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/render/Test2.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.render; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.player.PacketEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import dev.heliosclient.module.settings.SettingGroup; 8 | 9 | public class Test2 extends Module_ { 10 | private final SettingGroup sgGeneral = new SettingGroup("General"); 11 | 12 | 13 | public Test2() { 14 | super("Test 2", "Render Test 2", Categories.RENDER); 15 | addSettingGroup(sgGeneral); 16 | } 17 | 18 | @Override 19 | public void onEnable() { 20 | super.onEnable(); 21 | if (mc.player == null) return; 22 | } 23 | 24 | @Override 25 | public void onDisable() { 26 | super.onDisable(); 27 | } 28 | @SubscribeEvent 29 | public void onPackRec(PacketEvent.RECEIVE e){} 30 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/render/TimeChanger.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.render; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.player.PacketEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import dev.heliosclient.module.settings.DoubleSetting; 8 | import dev.heliosclient.module.settings.SettingGroup; 9 | import net.minecraft.network.packet.s2c.play.WorldTimeUpdateS2CPacket; 10 | 11 | public class TimeChanger extends Module_ { 12 | SettingGroup sgGeneral = new SettingGroup("General"); 13 | 14 | public DoubleSetting time = sgGeneral.add(new DoubleSetting.Builder() 15 | .name("Time") 16 | .description("Time of world") 17 | .onSettingChange(this) 18 | .value(0d) 19 | .defaultValue(0d) 20 | .range(-20000, 20000) 21 | .roundingPlace(0) 22 | .build() 23 | ); 24 | 25 | public TimeChanger() { 26 | super("TimeChanger", "Changes world time", Categories.RENDER); 27 | addSettingGroup(sgGeneral); 28 | addQuickSettings(sgGeneral.getSettings()); 29 | 30 | } 31 | 32 | @Override 33 | public void onEnable() { 34 | super.onEnable(); 35 | } 36 | 37 | @Override 38 | public void onDisable() { 39 | super.onDisable(); 40 | } 41 | 42 | @SubscribeEvent 43 | private void onPacketReceive(PacketEvent.RECEIVE event) { 44 | if (event.packet instanceof WorldTimeUpdateS2CPacket packet) { 45 | event.cancel(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/render/hiteffect/HitEffectParticle.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.render.hiteffect; 2 | 3 | import dev.heliosclient.util.color.ColorUtils; 4 | import net.minecraft.client.util.math.MatrixStack; 5 | 6 | import java.awt.*; 7 | 8 | public abstract class HitEffectParticle { 9 | public int life = 0; 10 | public int current_age = 0; 11 | public boolean isDiscarded = false; 12 | public boolean hasRandomColor = false; 13 | protected Color particleColor = Color.WHITE; 14 | 15 | 16 | public HitEffectParticle(int life, boolean hasRandomColor) { 17 | this.life = life; 18 | this.hasRandomColor = hasRandomColor; 19 | 20 | if(hasRandomColor) 21 | particleColor = ColorUtils.getRandomColor(); 22 | } 23 | 24 | public void tick() { 25 | current_age++; 26 | if (current_age > life) { 27 | discard(); 28 | } 29 | } 30 | 31 | public abstract void render(MatrixStack stack, Color color); 32 | 33 | public void discard() { 34 | isDiscarded = true; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/world/AbortBreaking.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.world; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.block.CancelBlockBreakingEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | 8 | public class AbortBreaking extends Module_ { 9 | public AbortBreaking() { 10 | super("AbortBreaking", "Allows you to abort breaking without loosing progress", Categories.WORLD); 11 | } 12 | 13 | @SubscribeEvent 14 | public void onCancelBlockBreaking(CancelBlockBreakingEvent event) { 15 | event.setCanceled(true); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/world/AntiBookBan.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.world; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class AntiBookBan extends Module_ { 7 | public AntiBookBan() { 8 | super("AntiBookBan", "Prevents you from being book banned", Categories.WORLD); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/world/LiquidInteract.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.world; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | 6 | public class LiquidInteract extends Module_ { 7 | public LiquidInteract() { 8 | super("LiquidInteract", "Allows you to interact inside liquids", Categories.WORLD); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/world/PacketPlace.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.world; 2 | 3 | import dev.heliosclient.event.SubscribeEvent; 4 | import dev.heliosclient.event.events.block.BlockInteractEvent; 5 | import dev.heliosclient.module.Categories; 6 | import dev.heliosclient.module.Module_; 7 | import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket; 8 | import net.minecraft.util.Hand; 9 | import net.minecraft.util.hit.BlockHitResult; 10 | 11 | public class PacketPlace extends Module_ { 12 | int sequence = 0; 13 | 14 | public PacketPlace() { 15 | super("PacketPlace", "Places blocks using packets", Categories.WORLD); 16 | } 17 | 18 | @SubscribeEvent 19 | public void onBlockInteract(BlockInteractEvent event) { 20 | if (mc.player == null) return; 21 | BlockHitResult hitResult = event.getHitResult(); 22 | 23 | // if(!BlockUtils.canPlace(hitResult.getBlockPos(),mc.world.getBlockState(hitResult.getBlockPos())))return; 24 | event.setCanceled(true); 25 | 26 | mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, hitResult, sequence)); 27 | sequence++; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/modules/world/Timer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.modules.world; 2 | 3 | import dev.heliosclient.module.Categories; 4 | import dev.heliosclient.module.Module_; 5 | import dev.heliosclient.module.settings.DoubleSetting; 6 | import dev.heliosclient.module.settings.SettingGroup; 7 | 8 | public class Timer extends Module_ { 9 | 10 | public static double RESET = 1; 11 | double override = 1; 12 | 13 | SettingGroup sgGeneral = new SettingGroup("General"); 14 | DoubleSetting timerMultiplier = sgGeneral.add(new DoubleSetting.Builder() 15 | .name("Timer Multiplier") 16 | .description("The multipler value to speed the game by") 17 | .onSettingChange(this) 18 | .range(0, 50) 19 | .value(1D) 20 | .defaultValue(1D) 21 | .value(1D) 22 | .roundingPlace(1) 23 | .build() 24 | ); 25 | 26 | public Timer() { 27 | super("Timer", "Change the speed of your game", Categories.WORLD); 28 | addSettingGroup(sgGeneral); 29 | addQuickSettings(sgGeneral.getSettings()); 30 | } 31 | 32 | public void setOverride(double override) { 33 | this.override = override; 34 | } 35 | 36 | public double getTimerMultiplier() { 37 | return override != RESET ? override : (isActive() ? timerMultiplier.value : RESET); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/settings/ParentScreenSetting.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.settings; 2 | 3 | import net.minecraft.client.gui.screen.Screen; 4 | 5 | import java.util.function.BooleanSupplier; 6 | 7 | public class ParentScreenSetting extends Setting { 8 | public Screen parentScreen = null; 9 | 10 | public ParentScreenSetting(BooleanSupplier shouldRender, T defaultValue) { 11 | super(shouldRender, defaultValue); 12 | } 13 | 14 | public Screen getParentScreen() { 15 | return parentScreen; 16 | } 17 | 18 | public void setParentScreen(Screen parentScreen) { 19 | this.parentScreen = parentScreen; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/settings/Separator.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.settings; 2 | 3 | import dev.heliosclient.util.render.Renderer2D; 4 | import net.minecraft.client.font.TextRenderer; 5 | import net.minecraft.client.gui.DrawContext; 6 | 7 | import java.util.function.BooleanSupplier; 8 | 9 | public class Separator extends Setting { 10 | 11 | public Separator(int height, BooleanSupplier shouldRender) { 12 | super(shouldRender, (Void) null); 13 | this.value = null; 14 | this.height = height; 15 | } 16 | 17 | @Override 18 | public void render(DrawContext drawContext, int x, int y, int mouseX, int mouseY, TextRenderer textRenderer) { 19 | Renderer2D.drawRectangle(drawContext.getMatrices().peek().getPositionMatrix(), x + 2, y + (float) height / 2, width - 2, 1, 0xCCFFFFFF); 20 | } 21 | 22 | @Override 23 | public void renderCompact(DrawContext drawContext, int x, int y, int mouseX, int mouseY, TextRenderer textRenderer) { 24 | Renderer2D.drawRectangle(drawContext.getMatrices().peek().getPositionMatrix(), x + 2, y + (float) heightCompact / 2, getWidthCompact() - 2, 1, 0xCCFFFFFF); 25 | } 26 | 27 | @Override 28 | public Void get() { 29 | return null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/module/settings/Space.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.module.settings; 2 | 3 | import net.minecraft.client.font.TextRenderer; 4 | import net.minecraft.client.gui.DrawContext; 5 | 6 | import java.util.function.BooleanSupplier; 7 | 8 | public class Space extends Setting { 9 | public Space(int height, BooleanSupplier shouldRender, boolean defaultValue) { 10 | super(shouldRender, defaultValue); 11 | this.height = height; 12 | this.heightCompact = height; 13 | } 14 | 15 | @Override 16 | public void render(DrawContext drawContext, int x, int y, int mouseX, int mouseY, TextRenderer textRenderer) {} 17 | 18 | @Override 19 | public void renderCompact(DrawContext drawContext, int x, int y, int mouseX, int mouseY, TextRenderer textRenderer) {} 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/scripting/libraries/PacketLib.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.scripting.libraries; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import net.minecraft.network.packet.Packet; 5 | import org.luaj.vm2.LuaValue; 6 | import org.luaj.vm2.lib.TwoArgFunction; 7 | 8 | public class PacketLib extends TwoArgFunction { 9 | public PacketLib() { 10 | 11 | } 12 | 13 | public static void sendPacket(Packet packet) { 14 | if (HeliosClient.MC.player != null && HeliosClient.MC.player.networkHandler != null) { 15 | HeliosClient.MC.player.networkHandler.sendPacket(packet); 16 | } 17 | } 18 | 19 | @Override 20 | public LuaValue call(LuaValue modname, LuaValue env) { 21 | LuaValue library = tableOf(); 22 | 23 | env.set("packetLib", library); 24 | if (!env.get("package").isnil()) 25 | env.get("package").get("loaded").set("packetLib", library); 26 | 27 | return library; 28 | } 29 | 30 | //Todo: Add more packets 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/Friend.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system; 2 | 3 | public record Friend(String playerName) { 4 | // Override to compare friends by their player names 5 | @Override 6 | public boolean equals(Object obj) { 7 | if (obj instanceof Friend other) { 8 | return this.playerName.equals(other.playerName); 9 | } 10 | return false; 11 | } 12 | 13 | @Override 14 | public String playerName() { 15 | return playerName; 16 | } 17 | 18 | @Override 19 | public int hashCode() { 20 | return this.playerName.hashCode(); 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return playerName; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/HeliosExecutor.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system; 2 | 3 | import java.util.concurrent.Callable; 4 | import java.util.concurrent.ExecutorService; 5 | import java.util.concurrent.Executors; 6 | import java.util.concurrent.Future; 7 | import java.util.concurrent.atomic.AtomicInteger; 8 | 9 | public class HeliosExecutor { 10 | private static final AtomicInteger threadNumber = new AtomicInteger(1); 11 | private static final ExecutorService executorService = Executors.newCachedThreadPool((task) -> { 12 | Thread thread = new Thread(task); 13 | thread.setDaemon(true); 14 | thread.setName("Helios-Executor-" + threadNumber.getAndIncrement()); 15 | return thread; 16 | }); 17 | 18 | public static void execute(Runnable task) { 19 | if(task != null && !executorService.isTerminated() && !executorService.isShutdown()) 20 | executorService.execute(task); 21 | } 22 | 23 | public static void shutdown() { 24 | executorService.shutdown(); 25 | } 26 | 27 | public static boolean isShutdown() { 28 | return executorService.isShutdown(); 29 | } 30 | 31 | public static Future submit(Runnable task) { 32 | return executorService.submit(task); 33 | } 34 | 35 | public static Future submit(Callable task) { 36 | return executorService.submit(task); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/HeliosSoundInstance.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system; 2 | 3 | import net.minecraft.client.sound.AbstractSoundInstance; 4 | import net.minecraft.sound.SoundCategory; 5 | import net.minecraft.sound.SoundEvent; 6 | import net.minecraft.util.Identifier; 7 | import net.minecraft.util.math.random.Random; 8 | 9 | public class HeliosSoundInstance extends AbstractSoundInstance { 10 | public HeliosSoundInstance(SoundEvent sound, SoundCategory category, Random random) { 11 | super(sound, category, random); 12 | } 13 | 14 | public HeliosSoundInstance(Identifier soundId, SoundCategory category, Random random) { 15 | super(soundId, category, random); 16 | } 17 | 18 | public void setVolume(float volume) { 19 | this.volume = volume; 20 | } 21 | 22 | public void setPitch(float pitch) { 23 | this.pitch = pitch; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/UniqueID.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system; 2 | 3 | import java.util.Random; 4 | 5 | public class UniqueID { 6 | private static final String ALPHANUMERIC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"; 7 | private static final Random RANDOM = new Random(); 8 | private static int LENGTH = 5; 9 | public String uniqueID; 10 | 11 | public UniqueID(String id) { 12 | this.uniqueID = id; 13 | } 14 | 15 | public static UniqueID setLengthAndGet(int length) { 16 | LENGTH = length; 17 | UniqueID id = generate(); 18 | LENGTH = 5; 19 | return id; 20 | } 21 | 22 | public static UniqueID generate() { 23 | StringBuilder sb = new StringBuilder(LENGTH); 24 | for (int i = 0; i < LENGTH; i++) { 25 | sb.append(ALPHANUMERIC.charAt(RANDOM.nextInt(ALPHANUMERIC.length()))); 26 | } 27 | return new UniqueID(sb.toString()); 28 | } 29 | 30 | public String getUniqueID() { 31 | return uniqueID; 32 | } 33 | 34 | public void setUniqueID(String uniqueID) { 35 | this.uniqueID = uniqueID; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/IEntityRenderState.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | import net.minecraft.entity.Entity; 4 | 5 | public interface IEntityRenderState { 6 | void helios$setEntity(Entity entity); 7 | Entity helios$getEntity(); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/IExplosion.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | import net.minecraft.util.math.Vec3d; 4 | 5 | public interface IExplosion { 6 | void heliosClient$set(Vec3d pos, float power, boolean createFire); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/IExplosionS2CPacket.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | public interface IExplosionS2CPacket { 4 | void helios$setVelocityX(float vX); 5 | void helios$setVelocityY(float vY); 6 | void helios$setVelocityZ(float vZ); 7 | 8 | double helios$getVelocityX(); 9 | double helios$getVelocityY(); 10 | double helios$getVelocityZ(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/IPlayerInteractEntityC2SPacket.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | import net.minecraft.entity.Entity; 4 | import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket; 5 | 6 | public interface IPlayerInteractEntityC2SPacket { 7 | @SuppressWarnings("all") 8 | PlayerInteractEntityC2SPacket.InteractType getType(); 9 | 10 | Entity getEntity(); 11 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/ISimpleOption.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | public interface ISimpleOption { 4 | void heliosClient$setValueUnrestricted(T value); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/system/mixininterface/IVec3d.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.system.mixininterface; 2 | 3 | public interface IVec3d { 4 | void heliosClient$set(double x, double y, double z); 5 | void heliosClient$setY(double y); 6 | void heliosClient$setXZ(double x, double z); 7 | void heliosClient$setX(double x); 8 | void heliosClient$setZ(double z); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/ui/altmanager/AltManagerScreen.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.ui.altmanager; 2 | 3 | import net.minecraft.client.gui.DrawContext; 4 | import net.minecraft.client.gui.screen.Screen; 5 | import net.minecraft.text.Text; 6 | 7 | public class AltManagerScreen extends Screen { 8 | //WIP 9 | 10 | public static AltManagerScreen INSTANCE = new AltManagerScreen(); 11 | 12 | protected AltManagerScreen() { 13 | super(Text.literal("Alt Manager")); 14 | } 15 | 16 | @Override 17 | public void render(DrawContext drawContext, int mouseX, int mouseY, float delta) { 18 | renderBackgroundTexture(drawContext,MENU_BACKGROUND_TEXTURE,0,0,0,0,width,height); 19 | } 20 | 21 | @Override 22 | public boolean mouseClicked(double mouseX, double mouseY, int button) { 23 | return super.mouseClicked(mouseX, mouseY, button); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/ui/clickgui/gui/tables/TableEntry.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.ui.clickgui.gui.tables; 2 | 3 | public interface TableEntry { 4 | double getWidth(); 5 | double getHeight(); 6 | void setPosition(double x, double y); 7 | void setWidth(double width); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/ui/clickgui/navbar/NavBar.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.ui.clickgui.navbar; 2 | 3 | import dev.heliosclient.managers.NavBarManager; 4 | import dev.heliosclient.util.render.Renderer2D; 5 | import net.minecraft.client.font.TextRenderer; 6 | import net.minecraft.client.gui.DrawContext; 7 | 8 | public class NavBar { 9 | public static final NavBar navBar = new NavBar(); 10 | 11 | public NavBar() { 12 | } 13 | 14 | public void render(DrawContext drawContext, TextRenderer textRenderer, int mouseX, int mouseY) { 15 | int width = 2; 16 | for (NavBarItem item : NavBarManager.INSTANCE.navBarItems) { 17 | width += Math.round(Renderer2D.getFxStringWidth(item.name)) + 4; 18 | } 19 | int x = drawContext.getScaledWindowWidth() / 2 - width / 2; 20 | 21 | int textX = x + 4; 22 | int i; 23 | for (i = 0; i < NavBarManager.INSTANCE.navBarItems.size(); i++) { 24 | NavBarItem item = NavBarManager.INSTANCE.navBarItems.get(i); 25 | item.render(drawContext, textX, 0, mouseX, mouseY, i == 0, NavBarManager.INSTANCE.navBarItems.size() - 1 == i); 26 | textX += item.width; 27 | } 28 | } 29 | 30 | public void mouseClicked(int mouseX, int mouseY, int button) { 31 | for (NavBarItem item : NavBarManager.INSTANCE.navBarItems) { 32 | item.mouseClicked(mouseX, mouseY, button); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/animation/Animation.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.animation; 2 | 3 | 4 | import net.minecraft.util.math.MathHelper; 5 | 6 | public class Animation { 7 | private float FADE_SPEED = 0.05f; 8 | private float alpha = 1.0f; 9 | private boolean fading = false; 10 | private boolean fadeIn = false; 11 | private EasingType easingType = EasingType.LINEAR_IN; 12 | 13 | public Animation(EasingType easingType) { 14 | this.easingType = easingType; 15 | } 16 | 17 | public void startFading(boolean fadeIn) { 18 | this.fading = true; 19 | this.fadeIn = fadeIn; 20 | this.alpha = fadeIn ? 0.0f : 1.0f; 21 | } 22 | 23 | private void updateAlpha() { 24 | if (fading) { 25 | alpha += fadeIn ? FADE_SPEED : -FADE_SPEED; 26 | if (alpha <= 0.0f || alpha >= 1.0f) { 27 | fading = false; 28 | alpha = MathHelper.clamp(alpha,0.0f,1.0f); 29 | } 30 | } 31 | } 32 | 33 | public void setFadeSpeed(float FADE_SPEED) { 34 | this.FADE_SPEED = FADE_SPEED; 35 | } 36 | 37 | public void setEasingType(EasingType easingType) { 38 | this.easingType = easingType; 39 | } 40 | 41 | public void setAlpha(float alpha) { 42 | this.alpha = alpha; 43 | } 44 | 45 | public float getInterpolatedAlpha() { 46 | updateAlpha(); 47 | return Easing.ease(easingType, alpha); 48 | } 49 | 50 | public EasingType getEasingType() { 51 | return easingType; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/animation/EasingType.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.animation; 2 | 3 | public enum EasingType { 4 | LINEAR_IN, 5 | LINEAR_OUT, 6 | LINEAR_IN_OUT, 7 | QUADRATIC_IN, 8 | QUADRATIC_OUT, 9 | QUADRATIC_IN_OUT, 10 | CUBIC_IN, 11 | CUBIC_OUT, 12 | CUBIC_IN_OUT, 13 | QUARTIC_IN, 14 | QUARTIC_OUT, 15 | QUARTIC_IN_OUT, 16 | BOUNCE_IN, 17 | BOUNCE_OUT, 18 | BOUNCE_IN_OUT, 19 | SINE_IN, 20 | SINE_OUT, 21 | SINE_IN_OUT, 22 | BACK_OUT, 23 | LINEAR_SIGMOID 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/animation/KeyframeAnimation.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.animation; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class KeyframeAnimation { 7 | 8 | private final List keyframes = new ArrayList<>(); 9 | private float currentTime = 0; 10 | 11 | public void addKeyframe(float time, float value) { 12 | keyframes.add(new Keyframe(time, value)); 13 | } 14 | 15 | public float update(float deltaTime) { 16 | currentTime += deltaTime; 17 | 18 | Keyframe previousKeyframe = null; 19 | for (Keyframe keyframe : keyframes) { 20 | if (keyframe.time > currentTime) { 21 | if (previousKeyframe == null) { 22 | return keyframe.value; 23 | } else { 24 | float t = (currentTime - previousKeyframe.time) / (keyframe.time - previousKeyframe.time); 25 | return previousKeyframe.value + t * (keyframe.value - previousKeyframe.value); 26 | } 27 | } 28 | previousKeyframe = keyframe; 29 | } 30 | 31 | return previousKeyframe != null ? previousKeyframe.value : 0; 32 | } 33 | 34 | private static class Keyframe { 35 | float time; 36 | float value; 37 | 38 | Keyframe(float time, float value) { 39 | this.time = time; 40 | this.value = value; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/fontutils/FontRenderers.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.fontutils; 2 | 3 | import me.x150.renderer.font.FontRenderer; 4 | 5 | public class FontRenderers { 6 | /** This fontRenderer is used by the HUD mainly through the Renderer2D drawing string functions */ 7 | public static FontRenderer fontRenderer; 8 | 9 | /** 10 | * These font renderers are standard font renderer for the clickGUI, whose size is modified by the user 11 | * (except the iconRenderer which is at 10f) 12 | */ 13 | public static BetterFontRenderer fxfontRenderer; 14 | public static BetterFontRenderer iconRenderer; 15 | 16 | /** 17 | * This fontRenderer uses the DComicFont font for HitEffect Text mode 18 | * Size: 12f 19 | */ 20 | public static BetterFontRenderer Comical_fxfontRenderer; 21 | 22 | 23 | // -- These fontRenderers have fixed size which cannot be changed. -- // 24 | 25 | /** 26 | * Size 4f 27 | */ 28 | public static BetterFontRenderer Super_Small_iconRenderer; 29 | public static BetterFontRenderer Super_Small_fxfontRenderer; 30 | 31 | /** 32 | * Size 6f 33 | */ 34 | public static BetterFontRenderer Small_iconRenderer; 35 | public static BetterFontRenderer Small_fxfontRenderer; 36 | 37 | /** 38 | * Size 8f 39 | */ 40 | public static BetterFontRenderer Mid_iconRenderer; 41 | public static BetterFontRenderer Mid_fxfontRenderer; 42 | 43 | /** 44 | * Size 13f 45 | */ 46 | public static BetterFontRenderer Large_iconRenderer; 47 | public static BetterFontRenderer Large_fxfontRenderer; 48 | 49 | /** 50 | * Size 25f 51 | */ 52 | public static BetterFontRenderer Ultra_Large_iconRenderer; 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/fontutils/FontUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.fontutils; 2 | 3 | import java.awt.*; 4 | 5 | public class FontUtils { 6 | 7 | public static Font[] rearrangeFontsArray(Font[] fonts, Font fontToMove) { 8 | // Find the index of the fontToMove in the array 9 | int index = -1; 10 | for (int i = 0; i < fonts.length; i++) { 11 | if (fonts[i].equals(fontToMove)) { 12 | index = i; 13 | break; 14 | } 15 | } 16 | 17 | // If the fontToMove is not found in the array, return the original array 18 | if (index == -1) { 19 | return fonts; 20 | } 21 | 22 | // Create a new array with the same length as the original array 23 | Font[] rearrangedFonts = new Font[fonts.length]; 24 | 25 | // Place the fontToMove at index 0 26 | rearrangedFonts[0] = fontToMove; 27 | 28 | // Move all the fonts one position forward 29 | System.arraycopy(fonts, 0, rearrangedFonts, 1, index); 30 | System.arraycopy(fonts, index + 1, rearrangedFonts, index + 1, fonts.length - index - 1); 31 | 32 | return rearrangedFonts; 33 | } 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/inputbox/lua/Token.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.inputbox.lua; 2 | 3 | public record Token(TokenType type, String value) { } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/inputbox/lua/TokenPatterns.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.inputbox.lua; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | public class TokenPatterns { 6 | public static final Pattern KEYWORD = Pattern.compile("\\b(and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while)\\b"); 7 | public static final Pattern BOOLEAN = Pattern.compile("\\b(true|false)\\b"); 8 | public static final Pattern STRING = Pattern.compile("\".*?\"|'.*?'"); 9 | public static final Pattern COMMENT = Pattern.compile("--.*"); 10 | public static final Pattern NUMBER = Pattern.compile("\\b\\d+\\b"); 11 | public static final Pattern VARIABLE_DECLARATION = Pattern.compile("\\blocal\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b"); 12 | public static final Pattern METHOD_CALL = Pattern.compile("[:.]\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\b"); 13 | public static final Pattern VARIABLE_USAGE = Pattern.compile("\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"); //unused 14 | public static final Pattern WHITESPACE = Pattern.compile("\\s+"); 15 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/inputbox/lua/TokenType.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.inputbox.lua; 2 | 3 | public enum TokenType { 4 | KEYWORD, BOOLEAN, STRING, COMMENT, NUMBER, VARIABLE_DECLARATION, FUNCTION, METHOD_CALL, WHITESPACE, UNKNOWN 5 | } 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/interfaces/ISaveAndLoad.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.interfaces; 2 | 3 | import dev.heliosclient.util.misc.MapReader; 4 | 5 | import java.util.List; 6 | 7 | public interface ISaveAndLoad { 8 | //Json Serializar??? Never heard of it. Seriously, someone fix this abomination. 9 | Object saveToFile(List list); 10 | 11 | void loadFromFile(MapReader map); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/interfaces/ISettingChange.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.interfaces; 2 | 3 | import dev.heliosclient.module.settings.Setting; 4 | 5 | public interface ISettingChange { 6 | void onSettingChange(Setting setting); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/interfaces/IWindowContentRenderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.interfaces; 2 | 3 | import dev.heliosclient.ui.clickgui.gui.Window; 4 | import net.minecraft.client.gui.DrawContext; 5 | 6 | public interface IWindowContentRenderer { 7 | void renderContent(Window window, DrawContext drawContext, int x, int y, int mouseX, int mouseY); 8 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/misc/EnchantmentUtil.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.misc; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import net.minecraft.enchantment.Enchantment; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.registry.Registry; 7 | import net.minecraft.registry.RegistryKey; 8 | import net.minecraft.registry.RegistryKeys; 9 | import net.minecraft.registry.entry.RegistryEntry; 10 | 11 | public class EnchantmentUtil { 12 | public static RegistryEntry getEnchantmentEntry(RegistryKey key){ 13 | Registry registry = HeliosClient.MC.world.getRegistryManager().getOrThrow(RegistryKeys.ENCHANTMENT); 14 | return registry.getEntry(registry.get(key)); 15 | } 16 | public static boolean hasEnchantment(ItemStack stack, RegistryKey key){ 17 | return stack.getEnchantments().getEnchantments().contains(getEnchantmentEntry(key)); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/misc/MapReader.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.misc; 2 | 3 | import dev.heliosclient.util.MathUtils; 4 | 5 | import java.util.Map; 6 | 7 | public record MapReader(Map map) { 8 | 9 | public int getInt(String key, int defaultVal) { 10 | return MathUtils.o2iSafe(map.getOrDefault(key, defaultVal)); 11 | } 12 | 13 | public long getLong(String key, long defaultVal) { 14 | return (long) map.getOrDefault(key, defaultVal); 15 | } 16 | 17 | public double getDouble(String key, double defaultVal) { 18 | return (double) map.getOrDefault(key, defaultVal); 19 | } 20 | 21 | public boolean getBoolean(String key, boolean defaultVal) { 22 | return (boolean) map.getOrDefault(key, defaultVal); 23 | } 24 | 25 | public String getString(String key, String defaultVal) { 26 | if (map.getOrDefault(key, defaultVal) instanceof String s) { 27 | return s; 28 | } 29 | return defaultVal; 30 | } 31 | 32 | public T getAs(String key, Class clazz) { 33 | return clazz.cast(map.get(key)); 34 | } 35 | 36 | public boolean has(String key) { 37 | return map.containsKey(key); 38 | } 39 | 40 | public MapReader getMap(String key) { 41 | Map nestedMap = (Map) map.get(key); 42 | if (nestedMap == null) { 43 | return null; 44 | } 45 | return new MapReader(nestedMap); 46 | } 47 | 48 | public boolean mapExists(){ 49 | return map != null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/misc/ReflectionUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.misc; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | /** 6 | * uhh why do we need this again? 7 | */ 8 | public class ReflectionUtils { 9 | public static Method tryGetMethod(String methodName, Class class1) { 10 | // safety be damned this is my own code I get to control when it crashes 11 | try { 12 | return class1.getDeclaredMethod(methodName, new Class[1]); 13 | } catch (Exception e) { 14 | e.printStackTrace(); 15 | return null; 16 | } 17 | } 18 | 19 | public static void tryCallMethod(Method method, Object... parameters) { 20 | // hope that shits static 21 | try { 22 | method.invoke(null, parameters); 23 | } catch (Exception e) { 24 | // go fuck yourself 25 | e.printStackTrace(); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/network/NetworkUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.network; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.mixin.AccessorClientWorld; 5 | import net.minecraft.client.network.PendingUpdateManager; 6 | import net.minecraft.client.network.SequencedPacketCreator; 7 | import net.minecraft.network.packet.Packet; 8 | 9 | public class NetworkUtils { 10 | public static void sendSequencedPacket(SequencedPacketCreator creator) { 11 | PendingUpdateManager pendingUpdateManager = ((AccessorClientWorld) HeliosClient.MC.world).getPendingUpdateManager(); 12 | pendingUpdateManager.incrementSequence(); 13 | 14 | Packet packet = creator.predict(pendingUpdateManager.getSequence()); 15 | 16 | HeliosClient.MC.getNetworkHandler().sendPacket(packet); 17 | } 18 | public static void sendPacketNoEvent(Packet packet) { 19 | HeliosClient.MC.getNetworkHandler().getConnection().send(packet); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/render/FrustumUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.render; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.mixin.AccessorFrustum; 5 | import dev.heliosclient.mixin.AccessorWorldRenderer; 6 | import net.minecraft.client.render.Frustum; 7 | import net.minecraft.util.math.Box; 8 | import net.minecraft.util.math.Vec3d; 9 | 10 | public class FrustumUtils { 11 | 12 | public static Frustum getFrustum() { 13 | return ((AccessorWorldRenderer) HeliosClient.MC.worldRenderer).getFrustum(); 14 | } 15 | 16 | public static boolean isBoxVisible(Box box) { 17 | return getFrustum().isVisible(box); 18 | } 19 | 20 | public static boolean isPointVisible(Vec3d vec) { 21 | return isPointVisible(vec.x, vec.y, vec.z); 22 | } 23 | 24 | public static boolean isPointVisible(double x, double y, double z) { 25 | AccessorFrustum frustum = (AccessorFrustum) getFrustum(); 26 | return frustum.getFrustumIntersection().testPoint((float) (x - frustum.getX()), (float) (y - frustum.getY()), (float) (z - frustum.getZ())); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/render/Renderer.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.render; 2 | 3 | import dev.heliosclient.util.render.shapes.Rectangle; 4 | import dev.heliosclient.util.render.shapes.RoundedRectangle; 5 | 6 | public class Renderer { 7 | public static final Rectangle rectangle = new Rectangle(); 8 | public static final RoundedRectangle roundedRectangle = new RoundedRectangle(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/render/color/RenderColor.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.render.color; 2 | 3 | public abstract class RenderColor { 4 | 5 | protected Integer[] overwriteColor = new Integer[4]; 6 | 7 | public void overwriteRed(Integer red) { 8 | overwriteColor[0] = red; 9 | } 10 | 11 | public void overwriteGreen(Integer green) { 12 | overwriteColor[1] = green; 13 | } 14 | 15 | public void overwriteBlue(Integer blue) { 16 | overwriteColor[2] = blue; 17 | } 18 | 19 | public void overwriteAlpha(Integer alpha) { 20 | overwriteColor[3] = alpha; 21 | } 22 | 23 | protected void cloneOverwriteTo(RenderColor otherColor) { 24 | otherColor.overwriteColor = overwriteColor.clone(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/render/shapes/Shape.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.render.shapes; 2 | 3 | import com.mojang.blaze3d.systems.RenderSystem; 4 | import net.minecraft.client.render.BufferBuilder; 5 | import net.minecraft.client.render.BufferRenderer; 6 | import net.minecraft.client.render.Tessellator; 7 | import net.minecraft.client.render.VertexFormat; 8 | import net.minecraft.client.util.math.MatrixStack; 9 | 10 | public abstract class Shape> { 11 | public float x,y; 12 | public BufferBuilder buffer = null; 13 | 14 | public Shape(){ 15 | } 16 | 17 | @SuppressWarnings("unchecked") 18 | protected T self() { 19 | return (T) this; 20 | } 21 | 22 | public T position(float x, float y) { 23 | this.x = x; 24 | this.y = y; 25 | return self(); 26 | } 27 | 28 | protected abstract void draw(MatrixStack stack); 29 | public void vertex(MatrixStack stack, BufferBuilder buffer) {} 30 | 31 | protected void begin(VertexFormat.DrawMode drawMode, VertexFormat vertexFormat){ 32 | buffer = Tessellator.getInstance().begin(drawMode,vertexFormat); 33 | RenderSystem.setShaderColor(1.0f,1.0f,1.0f,1.0f); 34 | RenderSystem.enableBlend(); 35 | } 36 | 37 | protected void end(){ 38 | drawBuffer(); 39 | RenderSystem.disableBlend(); 40 | RenderSystem.setShaderColor(1.0f,1.0f,1.0f,1.0f); 41 | } 42 | 43 | protected void drawBuffer(){ 44 | BufferRenderer.drawWithGlobalProgram(buffer.end()); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/textures/ClearTexture.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.textures; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import net.minecraft.client.texture.ResourceTexture; 5 | import net.minecraft.util.Identifier; 6 | 7 | public class ClearTexture extends ResourceTexture { 8 | private static final Identifier CLEAR_TEXTURE = Identifier.of(HeliosClient.MODID, "splashscreen/clear.png"); 9 | 10 | public ClearTexture() { 11 | super(CLEAR_TEXTURE); 12 | } 13 | 14 | /* 15 | protected TextureData loadTextureData(ResourceManager resourceManager) { 16 | try { 17 | InputStream input = resourceManager.open(location); 18 | TextureData texture = null; 19 | 20 | if (input != null) { 21 | try { 22 | texture = new TextureData(new TextureResourceMetadata(true, true), NativeImage.read(input)); 23 | } finally { 24 | input.close(); 25 | } 26 | 27 | } 28 | 29 | return texture; 30 | } catch (IOException exception) { 31 | return new TextureData(exception); 32 | } 33 | } 34 | 35 | */ 36 | 37 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/textures/ClientTexture.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.textures; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import net.minecraft.client.texture.ResourceTexture; 5 | import net.minecraft.util.Identifier; 6 | 7 | public class ClientTexture extends ResourceTexture { 8 | public static final Identifier CLIENT_LOGO_TEXTURE = Identifier.of(HeliosClient.MODID,"splashscreen/client_splash.png"); 9 | public static final Identifier CLIENT_ICON_TEXTURE = Identifier.of(HeliosClient.MODID,"icon.png"); 10 | 11 | public ClientTexture(boolean icon) { 12 | super(icon ? CLIENT_ICON_TEXTURE : CLIENT_LOGO_TEXTURE); 13 | } 14 | /* 15 | @Override 16 | public TextureContents loadContents(ResourceManager resourceManager) { 17 | try (InputStream inputStream = resourceManager.open(getId().t)) { 18 | if (inputStream == null) { 19 | return new TextureContents(new FileNotFoundException(location.toString())); 20 | } 21 | TextureContents textureData; 22 | try { 23 | textureData = new TextureContents(new TextureResourceMetadata(true, true), NativeImage.read(inputStream)); 24 | } catch (Throwable throwable) { 25 | try { 26 | inputStream.close(); 27 | } catch (Throwable var7) { 28 | throwable.addSuppressed(var7); 29 | } 30 | 31 | throw throwable; 32 | } 33 | 34 | inputStream.close(); 35 | 36 | return textureData; 37 | } catch (IOException exception) { 38 | return new TextureContents(exception); 39 | } 40 | } 41 | 42 | */ 43 | } -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/world/ChunkChecker.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.world; 2 | 3 | import net.minecraft.util.math.BlockPos; 4 | import net.minecraft.world.Heightmap; 5 | import net.minecraft.world.World; 6 | import net.minecraft.world.chunk.Chunk; 7 | 8 | import java.util.function.Consumer; 9 | 10 | public record ChunkChecker(World world, Chunk chunk, Consumer blockPosConsumer) implements Runnable { 11 | 12 | @Override 13 | public void run() { 14 | Heightmap heightmap = chunk.getHeightmap(Heightmap.Type.WORLD_SURFACE); 15 | int maxY; 16 | for (int x = chunk.getPos().getStartX(); x <= chunk.getPos().getEndX(); x++) { 17 | for (int z = chunk.getPos().getStartZ(); z <= chunk.getPos().getEndZ(); z++) { 18 | maxY = heightmap.get(x - chunk.getPos().getStartX(), z - chunk.getPos().getStartZ()); 19 | for (int y = world.getBottomY(); y < maxY; y++) { 20 | BlockPos pos = new BlockPos(x, y, z); 21 | blockPosConsumer.accept(pos); 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/world/ChunkUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.world; 2 | 3 | import net.minecraft.block.entity.BlockEntity; 4 | import net.minecraft.util.math.ChunkPos; 5 | import net.minecraft.world.chunk.WorldChunk; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import java.util.stream.Stream; 10 | 11 | import static dev.heliosclient.HeliosClient.MC; 12 | 13 | public class ChunkUtils { 14 | 15 | public static Stream getBlockEntityStreamInChunks() { 16 | return getLoadedChunks().stream().flatMap((chunk) -> chunk.getBlockEntities().values().stream()); 17 | } 18 | 19 | public static List getLoadedChunks() { 20 | List chunks = new ArrayList<>(); 21 | int radius = Math.max(2, MC.options.getClampedViewDistance() + 3); 22 | ChunkPos center = new ChunkPos(MC.player.getBlockPos()); 23 | 24 | for (int dx = -radius; dx <= radius; dx++) { 25 | for (int dz = -radius; dz <= radius; dz++) { 26 | ChunkPos pos = new ChunkPos(center.x + dx, center.z + dz); 27 | if (MC.world.isChunkLoaded(pos.x, pos.z)) { 28 | chunks.add(MC.world.getChunk(pos.x, pos.z)); 29 | } 30 | } 31 | } 32 | 33 | return chunks; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/dev/heliosclient/util/world/RaytraceUtils.java: -------------------------------------------------------------------------------- 1 | package dev.heliosclient.util.world; 2 | 3 | import dev.heliosclient.HeliosClient; 4 | import dev.heliosclient.util.player.RotationUtils; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.projectile.ProjectileUtil; 7 | import net.minecraft.util.hit.EntityHitResult; 8 | import net.minecraft.util.math.Box; 9 | import net.minecraft.util.math.Vec3d; 10 | import org.jetbrains.annotations.Nullable; 11 | 12 | import java.util.function.Predicate; 13 | 14 | public class RaytraceUtils { 15 | @Nullable 16 | public static EntityHitResult raycastFromPlayer(float range) { 17 | Vec3d playerPos = HeliosClient.MC.player.getEyePos(); 18 | float yaw = HeliosClient.MC.player.getYaw(); 19 | float pitch = HeliosClient.MC.player.getPitch(); 20 | 21 | Vec3d direction = RotationUtils.getRotationVector(pitch,yaw).normalize(); 22 | Vec3d end = playerPos.add(direction.multiply(range)); 23 | 24 | Box box = new Box(playerPos, end); 25 | Predicate predicate = entity -> !entity.isSpectator() && entity.canHit(); 26 | 27 | return ProjectileUtil.raycast(HeliosClient.MC.player, playerPos, end, box, predicate, range); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/Comfortaa.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/Comfortaa.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/DComicFont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/DComicFont.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/JetBrainsMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/JetBrainsMono.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/Minecraft.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/Minecraft.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/Minecraftia.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/Minecraftia.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/Nunito.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/Nunito.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/fontello.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/fontello.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/icons.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/fonts/icons2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/fonts/icons2.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/heliosdevelopment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/heliosdevelopment.png -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/sounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "ting": { 3 | "sounds": [ 4 | "heliosclient:ting" 5 | ] 6 | }, 7 | "click": { 8 | "sounds": [ 9 | "heliosclient:click" 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/sounds/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/sounds/click.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/sounds/ting.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/sounds/ting.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/heliosclient/splashscreen/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeliosMinecraft/HeliosClient/0ca9dd2fce810f088a050922c9a51a1354328c60/src/main/resources/assets/heliosclient/splashscreen/clear.png -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "heliosclient", 4 | "version": "${version}", 5 | "name": "Helios Client", 6 | "description": "Anarchy focused utility mod.", 7 | "authors": [ 8 | "AzE", 9 | "ElBe", 10 | "tanishisherewith", 11 | "TomPlaneta" 12 | ], 13 | "contact": { 14 | "homepage": "https://github.com/HeliosMinecraft/HeliosClient/?tab=readme-ov-file#", 15 | "issues": "https://github.com/HeliosMinecraft/HeliosClient/issues" 16 | }, 17 | "license": "MIT", 18 | "icon": "assets/heliosclient/icon.png", 19 | "environment": "*", 20 | "entrypoints": { 21 | "main": [ 22 | "dev.heliosclient.HeliosClient" 23 | ], 24 | "preLaunch": [ 25 | "dev.heliosclient.PreLaunchMain" 26 | ] 27 | }, 28 | "accessWidener": "heliosclient.accesswidener", 29 | "mixins": [ 30 | "heliosclient.mixins.json" 31 | ], 32 | "depends": { 33 | "fabricloader": ">=0.16.10", 34 | "minecraft": "~1.21.5", 35 | "java": ">=21" 36 | }, 37 | "suggests": { 38 | "ModMenu": "*" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/heliosclient.accesswidener: -------------------------------------------------------------------------------- 1 | accessWidener v1 named 2 | accessible method net/minecraft/client/gui/DrawContext fillGradient (IIIIIII)V 3 | accessible class net/minecraft/client/world/ClientChunkManager$ClientChunkMap 4 | 5 | accessible method net/minecraft/client/network/ClientPlayerInteractionManager syncSelectedSlot ()V 6 | 7 | accessible class net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractType 8 | accessible class net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractTypeHandler 9 | accessible method net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractTypeHandler getType ()Lnet/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractType; 10 | 11 | accessible method net/minecraft/client/render/Camera setPos (DDD)V 12 | accessible method net/minecraft/client/render/Camera setRotation (FF)V 13 | 14 | accessible method net/minecraft/client/network/ClientPlayerEntity getPermissionLevel ()I 15 | 16 | accessible class net/minecraft/world/chunk/PalettedContainer$Data 17 | accessible method net/minecraft/world/chunk/PalettedContainer$Data palette ()Lnet/minecraft/world/chunk/Palette; 18 | accessible method net/minecraft/world/chunk/PalettedContainer$Data storage ()Lnet/minecraft/util/collection/PaletteStorage; 19 | accessible field net/minecraft/world/chunk/PalettedContainer data Lnet/minecraft/world/chunk/PalettedContainer$Data; 20 | 21 | accessible method net/minecraft/block/ChestBlock getOutlineShape (Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape; --------------------------------------------------------------------------------