├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── gradle.yml ├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src └── main ├── java └── com │ └── gamesense │ ├── api │ ├── config │ │ ├── LoadConfig.java │ │ └── SaveConfig.java │ ├── event │ │ ├── GameSenseEvent.java │ │ ├── MultiPhase.java │ │ ├── Phase.java │ │ └── events │ │ │ ├── AspectEvent.java │ │ │ ├── BlockChangeEvent.java │ │ │ ├── BlockResetEvent.java │ │ │ ├── BlockUpdateEvent.java │ │ │ ├── BoatMoveEvent.java │ │ │ ├── BossbarEvent.java │ │ │ ├── BoundingBoxEvent.java │ │ │ ├── ChorusEvent.java │ │ │ ├── ControlEvent.java │ │ │ ├── DamageBlockEvent.java │ │ │ ├── DestroyBlockEvent.java │ │ │ ├── DrawBlockDamageEvent.java │ │ │ ├── EntityCollisionEvent.java │ │ │ ├── NewRenderEntityEvent.java │ │ │ ├── OnUpdateWalkingPlayerEvent.java │ │ │ ├── PacketEvent.java │ │ │ ├── PlayerJoinEvent.java │ │ │ ├── PlayerJumpEvent.java │ │ │ ├── PlayerLeaveEvent.java │ │ │ ├── PlayerMoveEvent.java │ │ │ ├── ReachDistanceEvent.java │ │ │ ├── RenderEntityEvent.java │ │ │ ├── RenderEvent.java │ │ │ ├── RenderHand.java │ │ │ ├── SendMessageEvent.java │ │ │ ├── ShaderColorEvent.java │ │ │ ├── StepEvent.java │ │ │ ├── SwingEvent.java │ │ │ ├── TotemPopEvent.java │ │ │ ├── TransformSideFirstPersonEvent.java │ │ │ └── WaterPushEvent.java │ ├── setting │ │ ├── Setting.java │ │ ├── SettingsManager.java │ │ └── values │ │ │ ├── BooleanSetting.java │ │ │ ├── ColorSetting.java │ │ │ ├── DoubleSetting.java │ │ │ ├── IntegerSetting.java │ │ │ ├── ModeSetting.java │ │ │ └── StringSetting.java │ └── util │ │ ├── fix │ │ ├── EmptyJndiContext.java │ │ └── Fixer.java │ │ ├── font │ │ ├── CFont.java │ │ ├── CFontRenderer.java │ │ └── FontUtil.java │ │ ├── misc │ │ ├── ClassUtil.java │ │ ├── CollectionUtil.java │ │ ├── ColorUtil.java │ │ ├── Discord.java │ │ ├── EnumUtils.java │ │ ├── KeyBoardClass.java │ │ ├── MessageBus.java │ │ ├── NewChat.java │ │ ├── Pair.java │ │ ├── Timer.java │ │ ├── WebsocketClientEndpoint.java │ │ ├── ZipUtils.java │ │ └── cryptUtils.java │ │ ├── player │ │ ├── InventoryUtil.java │ │ ├── NameUtil.java │ │ ├── PhaseUtil.java │ │ ├── PlacementUtil.java │ │ ├── PlayerPacket.java │ │ ├── PlayerUtil.java │ │ ├── PredictUtil.java │ │ ├── RotationUtil.java │ │ ├── SpoofRotationUtil.java │ │ └── social │ │ │ ├── Enemy.java │ │ │ ├── Friend.java │ │ │ ├── SocialManager.java │ │ │ └── SpecialNames.java │ │ ├── render │ │ ├── CapeUtil.java │ │ ├── Chams.java │ │ ├── ChamsUtil.java │ │ ├── GSColor.java │ │ ├── RenderUtil.java │ │ └── shaders │ │ │ ├── FramebufferShader.java │ │ │ ├── Shader.java │ │ │ └── impl │ │ │ ├── fill │ │ │ ├── AquaShader.java │ │ │ ├── CircleShader.java │ │ │ ├── FillShader.java │ │ │ ├── FlowShader.java │ │ │ ├── GradientShader.java │ │ │ ├── PhobosShader.java │ │ │ ├── RainbowCubeShader.java │ │ │ └── SmokeShader.java │ │ │ └── outline │ │ │ ├── AquaOutlineShader.java │ │ │ ├── AstralOutlineShader.java │ │ │ ├── CircleOutlineShader.java │ │ │ ├── Default.java │ │ │ ├── GlowShader.java │ │ │ ├── GradientOutlineShader.java │ │ │ ├── RainbowCubeOutlineShader.java │ │ │ └── SmokeOutlineShader.java │ │ └── world │ │ ├── BlockUtil.java │ │ ├── EntityUtil.java │ │ ├── GeometryMasks.java │ │ ├── HoleUtil.java │ │ ├── Location.java │ │ ├── MotionUtil.java │ │ ├── Offsets.java │ │ └── combat │ │ ├── CrystalUtil.java │ │ ├── DamageUtil.java │ │ └── ac │ │ ├── ACHelper.java │ │ ├── ACSettings.java │ │ ├── ACUtil.java │ │ ├── CrystalInfo.java │ │ ├── PlayerInfo.java │ │ ├── PositionInfo.java │ │ └── threads │ │ ├── ACCalculate.java │ │ └── ACSubThread.java │ ├── client │ ├── GameSense.java │ ├── clickgui │ │ ├── GameSenseGUI.java │ │ ├── GuiConfig.java │ │ └── TextFieldKeys.java │ ├── command │ │ ├── Command.java │ │ ├── CommandManager.java │ │ └── commands │ │ │ ├── AutoGGCommand.java │ │ │ ├── AutoGearCommand.java │ │ │ ├── AutoReplyCommand.java │ │ │ ├── AutoRespawnCommand.java │ │ │ ├── BackupConfigCommand.java │ │ │ ├── BindCommand.java │ │ │ ├── CmdListCommand.java │ │ │ ├── DamageCommand.java │ │ │ ├── DisableAllCommand.java │ │ │ ├── DrawnCommand.java │ │ │ ├── EnemyCommand.java │ │ │ ├── FixGUICommand.java │ │ │ ├── FixHUDCommand.java │ │ │ ├── FontCommand.java │ │ │ ├── FriendCommand.java │ │ │ ├── HClipCommand.java │ │ │ ├── ModulesCommand.java │ │ │ ├── MsgsCommand.java │ │ │ ├── OpenFolderCommand.java │ │ │ ├── PingCommand.java │ │ │ ├── PrefixCommand.java │ │ │ ├── ReleasesCommand.java │ │ │ ├── SaveConfigCommand.java │ │ │ ├── SetCommand.java │ │ │ ├── TeleportCommand.java │ │ │ ├── ToggleCommand.java │ │ │ ├── VClipCommand.java │ │ │ └── namesCommand.java │ ├── manager │ │ ├── Manager.java │ │ ├── ManagerLoader.java │ │ └── managers │ │ │ ├── ClientEventManager.java │ │ │ ├── PlayerPacketManager.java │ │ │ └── TotemPopManager.java │ └── module │ │ ├── Category.java │ │ ├── HUDModule.java │ │ ├── Module.java │ │ ├── ModuleManager.java │ │ └── modules │ │ ├── combat │ │ ├── AntiCrystal.java │ │ ├── AnvilTrap.java │ │ ├── AutoAnvil.java │ │ ├── AutoArmor.java │ │ ├── AutoCity.java │ │ ├── AutoCreeper.java │ │ ├── AutoCrystalRewrite.java │ │ ├── AutoFeetPlace.java │ │ ├── AutoLog.java │ │ ├── AutoSkull.java │ │ ├── AutoTrap.java │ │ ├── AutoWeb.java │ │ ├── BedAura.java │ │ ├── Blocker.java │ │ ├── CevBreaker.java │ │ ├── Criticals.java │ │ ├── Elevatot.java │ │ ├── FastBow.java │ │ ├── FootConcrete.java │ │ ├── FootWalker.java │ │ ├── Friends.java │ │ ├── HoleFill.java │ │ ├── KillAura.java │ │ ├── OffHand.java │ │ ├── PacketXP.java │ │ ├── PistonCrystal.java │ │ ├── SelfTrap.java │ │ ├── SelfWeb.java │ │ └── Surround.java │ │ ├── exploits │ │ ├── AutoDupe5b.java │ │ ├── BowExploit.java │ │ ├── ChorusPost.java │ │ ├── ClipFlight.java │ │ ├── CoordinateExploit.java │ │ ├── Crasher.java │ │ ├── Drown.java │ │ ├── FastBreak.java │ │ ├── HoosiersDupe.java │ │ ├── LiquidInteract.java │ │ ├── MiningSpoof.java │ │ ├── NewChunks.java │ │ ├── PacketUtils.java │ │ ├── PingSpoof.java │ │ ├── PortalGodmode.java │ │ ├── Reach.java │ │ ├── RoofInteract.java │ │ ├── RubberBand.java │ │ └── SpeedNom.java │ │ ├── gui │ │ ├── ClickGuiModule.java │ │ ├── ColorMain.java │ │ └── HUDEditor.java │ │ ├── hud │ │ ├── ArmorHUD.java │ │ ├── ArrayListModule.java │ │ ├── CombatInfo.java │ │ ├── Coordinates.java │ │ ├── Frames.java │ │ ├── InventoryViewer.java │ │ ├── LagNotifier.java │ │ ├── Notifications.java │ │ ├── PotionEffects.java │ │ ├── Radar.java │ │ ├── ServerInfo.java │ │ ├── Speedometer.java │ │ ├── TabGUIModule.java │ │ ├── TargetHUD.java │ │ ├── TargetInfo.java │ │ ├── TextRadar.java │ │ ├── Watermark.java │ │ └── Welcomer.java │ │ ├── misc │ │ ├── Announcer.java │ │ ├── AntiPing.java │ │ ├── AutoGG.java │ │ ├── AutoGear.java │ │ ├── AutoMount.java │ │ ├── AutoReply.java │ │ ├── AutoRespawn.java │ │ ├── AutoTool.java │ │ ├── ChatModifier.java │ │ ├── ChatSuffix.java │ │ ├── Credits.java │ │ ├── DiscordRPCModule.java │ │ ├── EchestFarmer.java │ │ ├── ExtraTab.java │ │ ├── FakePlayer.java │ │ ├── FastPlace.java │ │ ├── FastShulker.java │ │ ├── HotbarRefill.java │ │ ├── IRC.java │ │ ├── KillEffect.java │ │ ├── MouseClickAction.java │ │ ├── MultiTask.java │ │ ├── NoEntityTrace.java │ │ ├── NoKick.java │ │ ├── PacketLogger.java │ │ ├── PhysicsSpammer.java │ │ ├── PvPInfo.java │ │ ├── QueueNotifier.java │ │ ├── Quiver.java │ │ ├── SortInventory.java │ │ ├── Spammer.java │ │ └── XCarry.java │ │ ├── movement │ │ ├── AirJump.java │ │ ├── Anchor.java │ │ ├── AntiHunger.java │ │ ├── AntiVoid.java │ │ ├── AutoJump.java │ │ ├── AutoWalk.java │ │ ├── Avoid.java │ │ ├── Blink.java │ │ ├── BoatFly.java │ │ ├── BoundsMove.java │ │ ├── ElytraFly.java │ │ ├── EntityControl.java │ │ ├── EntitySpeed.java │ │ ├── FastFall.java │ │ ├── Flight.java │ │ ├── HighJump.java │ │ ├── HoleSnap.java │ │ ├── HoleTP.java │ │ ├── Jesus.java │ │ ├── LevitationControl.java │ │ ├── LiquidSpeed.java │ │ ├── LongJump.java │ │ ├── PassiveSpeed.java │ │ ├── Phase.java │ │ ├── PlayerTweaks.java │ │ ├── Pursue.java │ │ ├── ReverseStep.java │ │ ├── SafeWalk.java │ │ ├── Scaffold.java │ │ ├── SlowFall.java │ │ ├── Speed.java │ │ ├── Sprint.java │ │ ├── Step.java │ │ ├── TickShift.java │ │ ├── Timer.java │ │ ├── ViewLock.java │ │ └── WallClimb.java │ │ └── render │ │ ├── Ambience.java │ │ ├── Aspect.java │ │ ├── BlockHighlight.java │ │ ├── BreakESP.java │ │ ├── Bucked.java │ │ ├── CapesModule.java │ │ ├── Chams.java │ │ ├── ChorusViewer.java │ │ ├── CityESP.java │ │ ├── ClientTime.java │ │ ├── ESP.java │ │ ├── Freecam.java │ │ ├── Fullbright.java │ │ ├── HitSpheres.java │ │ ├── HoleESP.java │ │ ├── ItemShaders.java │ │ ├── LogoutSpots.java │ │ ├── MobOwner.java │ │ ├── Nametags.java │ │ ├── NoRender.java │ │ ├── PopChams.java │ │ ├── RainbowEnchant.java │ │ ├── RenderTweaks.java │ │ ├── Shaders.java │ │ ├── ShulkerViewer.java │ │ ├── SkyColor.java │ │ ├── StorageESP.java │ │ ├── Swing.java │ │ ├── Tracers.java │ │ ├── Trajectories.java │ │ ├── ViewModel.java │ │ ├── VoidESP.java │ │ ├── noGlitchBlock.java │ │ ├── predict.java │ │ └── zTrails.java │ └── mixin │ ├── GameSenseMixinLoader.java │ └── mixins │ ├── MixinAbstractClientPlayer.java │ ├── MixinAbstractHorse.java │ ├── MixinBlockLiquid.java │ ├── MixinBlockSoulSand.java │ ├── MixinChorus.java │ ├── MixinElytraSound.java │ ├── MixinEntity.java │ ├── MixinEntityBoat.java │ ├── MixinEntityLlama.java │ ├── MixinEntityPig.java │ ├── MixinEntityPlayer.java │ ├── MixinEntityPlayerSP.java │ ├── MixinEntityRenderer.java │ ├── MixinFontRenderer.java │ ├── MixinGetCollisionBB.java │ ├── MixinGuiBossOverlay.java │ ├── MixinGuiPlayerTabOverlay.java │ ├── MixinGuiScreen.java │ ├── MixinItemRenderer.java │ ├── MixinLayerArmorBase.java │ ├── MixinLayerBipedArmor.java │ ├── MixinLayerHeldItem.java │ ├── MixinMinecraft.java │ ├── MixinMovementInputFromOptions.java │ ├── MixinNetworkManager.java │ ├── MixinPlayerControllerMP.java │ ├── MixinPlayerOverlay.java │ ├── MixinRender.java │ ├── MixinRenderCrystal.java │ ├── MixinRenderGlobal.java │ ├── MixinRenderItem.java │ ├── MixinRenderLivingBase.java │ ├── MixinRenderManager.java │ ├── MixinRenderPlayer.java │ ├── MixinServerPing.java │ ├── MixinWorld.java │ └── accessor │ ├── AccessorCPacketAttack.java │ ├── AccessorEntityPlayerSP.java │ ├── IRenderGlobal.java │ └── IShaderGroup.java └── resources ├── assets └── gamesense │ ├── gamesense.png │ └── shaders │ ├── fragment │ ├── aqua.frag │ ├── aquaOutline.frag │ ├── astralOutline.frag │ ├── circle.frag │ ├── circleOutline.frag │ ├── default.frag │ ├── fill.frag │ ├── flow.frag │ ├── glow.frag │ ├── gradient.frag │ ├── outlineGradient.frag │ ├── phobos.frag │ ├── rainbowCube.frag │ ├── rainbowCubeOutline.frag │ ├── smoke.frag │ └── smokeOutline.frag │ └── vertex.vert ├── darwin └── libdiscord-rpc.dylib ├── gamesense_at.cfg ├── linux-x86-64 └── libdiscord-rpc.so ├── mcmod.info ├── mixins.gamesense.json ├── win32-x86-64 └── discord-rpc.dll └── win32-x86 └── discord-rpc.dll /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | Feel free to help out with development by creating a pull request and it will be reviewed. 3 | 4 | #### Guidelines 5 | * All code commited should be original or properly credited. 6 | * Please explain `in detail` on what you changed and why it would be beneficial. 7 | * Try to separate new features. Large pull requests with multiple new features take longer to be merged. 8 | * Try to follow the general style of the project. 9 | 10 | If you have any questions about this, feel free to ask in the discord or by messaging Hoosiers (GooberTown#7384) on Discord. 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a bug repost to fix an issue! 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Turn on '...' 17 | 3. Toggle '...' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Information:** 27 | - OS [e.g. Windows 10] 28 | - Version [e.g. 2.2.6] 29 | - Other mods used [list all of them] 30 | 31 | **Additional context** 32 | Add any other context about the problem here (e.g. screenshots, videos) 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project! 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | 5 | name: build 6 | 7 | on: [push,pull_request] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Set up JDK 1.8 16 | uses: actions/setup-java@v1 17 | with: 18 | java-version: 1.8 19 | 20 | - name: Cache Gradle packages 21 | uses: actions/cache@v2 22 | with: 23 | path: | 24 | ~/.gradle/caches 25 | ~/.gradle/wrapper 26 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*','**/gradle-wrapper.properties') }} 27 | restore-keys: | 28 | ${{ runner.os }}-gradle- 29 | 30 | - name: Grant execute permission for gradlew 31 | run: chmod +x gradlew 32 | 33 | - name: Decomp Workspace 34 | run: ./gradlew setupDecompWorkspace 35 | 36 | - name: Build 37 | run: ./gradlew build 38 | 39 | - uses: actions/upload-artifact@v2 40 | with: 41 | name: Package 42 | path: build/libs/*-release.jar 43 | 44 | - name: Cleanup Gradle Cache 45 | run: | 46 | rm -rf ~/.gradle/caches/modules-2/modules-2.lock 47 | rm -rf ~/.gradle/caches/modules-2/gc.properties 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea 15 | 16 | # gradle 17 | build 18 | .gradle 19 | 20 | # Mac files 21 | .DS_STORE 22 | 23 | # Files from Forge MDK 24 | forge*changelog.txt 25 | 26 | # other 27 | eclipse 28 | run -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx3G 2 | modGroup=com.gamesense 3 | modVersion=v2.3.4 4 | modBaseName=gamesense 5 | forgeVersion=1.12.2-14.23.5.2768 6 | mcpVersion=snapshot_20180814 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechAle/gsplusplus/9c030e5b799c6248f1e7a58d88f78f963ff9efc2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStorePath=wrapper/dists 5 | zipStoreBase=GRADLE_USER_HOME -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/GameSenseEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event; 2 | 3 | import me.zero.alpine.event.type.Cancellable; 4 | 5 | public class GameSenseEvent extends Cancellable { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/MultiPhase.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event; 2 | 3 | public interface MultiPhase { 4 | 5 | Phase getPhase(); 6 | 7 | T nextPhase(); 8 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/Phase.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event; 2 | 3 | public enum Phase { 4 | PRE, 5 | BY, 6 | POST 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/AspectEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class AspectEvent extends GameSenseEvent { 6 | private float aspect; 7 | 8 | public AspectEvent(float aspect) { 9 | this.aspect = aspect; 10 | } 11 | 12 | public float getAspect() { 13 | return this.aspect; 14 | } 15 | 16 | public void setAspect(float aspect) { 17 | this.aspect = aspect; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BlockChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.util.math.BlockPos; 6 | 7 | public class BlockChangeEvent extends GameSenseEvent { 8 | 9 | private final BlockPos position; 10 | private final Block block; 11 | 12 | public BlockChangeEvent(BlockPos position, Block block) { 13 | super(); 14 | this.position = position; 15 | this.block = block; 16 | } 17 | 18 | public Block getBlock() { 19 | return this.block; 20 | } 21 | 22 | public BlockPos getPosition() { 23 | return this.position; 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BlockResetEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class BlockResetEvent extends GameSenseEvent { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BlockUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | public class BlockUpdateEvent extends GameSenseEvent { 7 | BlockPos pos; 8 | 9 | public BlockUpdateEvent(BlockPos pos) { 10 | super(); 11 | this.pos = pos; 12 | } 13 | 14 | public BlockPos getPos() { 15 | return pos; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BoatMoveEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.entity.MoverType; 5 | 6 | public class BoatMoveEvent extends GameSenseEvent { 7 | private MoverType type; 8 | private double x; 9 | private double y; 10 | private double z; 11 | 12 | public BoatMoveEvent(MoverType moverType, double x, double y, double z) { 13 | super(); 14 | this.type = moverType; 15 | this.x = x; 16 | this.y = y; 17 | this.z = z; 18 | } 19 | 20 | public MoverType getType() { 21 | return this.type; 22 | } 23 | 24 | public void setType(MoverType type) { 25 | this.type = type; 26 | } 27 | 28 | public double getX() { 29 | return this.x; 30 | } 31 | 32 | public double getY() { 33 | return this.y; 34 | } 35 | 36 | public double getZ() { 37 | return this.z; 38 | } 39 | 40 | public void setX(double x) { 41 | this.x = x; 42 | } 43 | 44 | public void setY(double y) { 45 | this.y = y; 46 | } 47 | 48 | public void setZ(double z) { 49 | this.z = z; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BossbarEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class BossbarEvent extends GameSenseEvent { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/BoundingBoxEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.util.math.AxisAlignedBB; 6 | import net.minecraft.util.math.Vec3d; 7 | 8 | public class BoundingBoxEvent extends GameSenseEvent { 9 | 10 | public BoundingBoxEvent(Block block, Vec3d pos) { 11 | 12 | super(); 13 | this.block = block; 14 | this.pos = pos; 15 | 16 | } 17 | 18 | Block block; 19 | AxisAlignedBB bb; 20 | Vec3d pos; 21 | public boolean changed; 22 | 23 | public void setbb(AxisAlignedBB BoundingBox) { 24 | this.bb = BoundingBox; 25 | changed = true; 26 | } 27 | 28 | public Block getBlock() { 29 | return block; 30 | } 31 | 32 | public Vec3d getPos() {return pos;} 33 | 34 | public AxisAlignedBB getbb() { 35 | return bb; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/ChorusEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class ChorusEvent extends GameSenseEvent { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/ControlEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class ControlEvent extends GameSenseEvent { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/DamageBlockEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.EnumFacing; 5 | import net.minecraft.util.math.BlockPos; 6 | 7 | public class DamageBlockEvent extends GameSenseEvent { 8 | 9 | private BlockPos blockPos; 10 | private EnumFacing enumFacing; 11 | 12 | public DamageBlockEvent(BlockPos blockPos, EnumFacing enumFacing) { 13 | this.blockPos = blockPos; 14 | this.enumFacing = enumFacing; 15 | } 16 | 17 | public BlockPos getBlockPos() { 18 | return this.blockPos; 19 | } 20 | 21 | public void setBlockPos(BlockPos blockPos) { 22 | this.blockPos = blockPos; 23 | } 24 | 25 | public EnumFacing getEnumFacing() { 26 | return this.enumFacing; 27 | } 28 | 29 | public void setEnumFacing(EnumFacing enumFacing) { 30 | this.enumFacing = enumFacing; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/DestroyBlockEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | public class DestroyBlockEvent extends GameSenseEvent { 7 | 8 | private BlockPos blockPos; 9 | 10 | public DestroyBlockEvent(BlockPos blockPos) { 11 | super(); 12 | this.blockPos = blockPos; 13 | } 14 | 15 | public BlockPos getBlockPos() { 16 | return this.blockPos; 17 | } 18 | 19 | public void setBlockPos(BlockPos blockPos) { 20 | this.blockPos = blockPos; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/DrawBlockDamageEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class DrawBlockDamageEvent extends GameSenseEvent { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/EntityCollisionEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class EntityCollisionEvent extends GameSenseEvent { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/NewRenderEntityEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.client.model.ModelBase; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraftforge.fml.common.eventhandler.Event; 7 | 8 | /** 9 | * @author Hoosiers 10 | * @since 12/31/2020 11 | */ 12 | 13 | public class NewRenderEntityEvent 14 | extends GameSenseEvent { 15 | public ModelBase modelBase; 16 | public Entity entityIn; 17 | public float limbSwing; 18 | public float limbSwingAmount; 19 | public float ageInTicks; 20 | public float netHeadYaw; 21 | public float headPitch; 22 | public float scale; 23 | 24 | public NewRenderEntityEvent(ModelBase modelBase, Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { 25 | this.modelBase = modelBase; 26 | this.entityIn = entityIn; 27 | this.limbSwing = limbSwing; 28 | this.limbSwingAmount = limbSwingAmount; 29 | this.ageInTicks = ageInTicks; 30 | this.netHeadYaw = netHeadYaw; 31 | this.headPitch = headPitch; 32 | this.scale = scale; 33 | } 34 | 35 | public boolean isCancelable() { 36 | return true; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/PacketEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.network.Packet; 5 | 6 | public class PacketEvent extends GameSenseEvent { 7 | 8 | private final Packet packet; 9 | 10 | public PacketEvent(Packet packet) { 11 | super(); 12 | this.packet = packet; 13 | } 14 | 15 | public Packet getPacket() { 16 | return this.packet; 17 | } 18 | 19 | public static class Receive extends PacketEvent { 20 | 21 | public Receive(Packet packet) { 22 | super(packet); 23 | } 24 | } 25 | 26 | public static class Send extends PacketEvent { 27 | public Send(Packet packet) { 28 | super(packet); 29 | } 30 | } 31 | 32 | public static class PostReceive extends PacketEvent { 33 | public PostReceive(Packet packet) { 34 | super(packet); 35 | } 36 | } 37 | 38 | public static class PostSend extends PacketEvent { 39 | public PostSend(Packet packet) { 40 | super(packet); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/PlayerJoinEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class PlayerJoinEvent extends GameSenseEvent { 6 | 7 | private final String name; 8 | 9 | public PlayerJoinEvent(String name) { 10 | super(); 11 | this.name = name; 12 | } 13 | 14 | public String getName() { 15 | return this.name; 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/PlayerJumpEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class PlayerJumpEvent extends GameSenseEvent { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/PlayerLeaveEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class PlayerLeaveEvent extends GameSenseEvent { 6 | 7 | private final String name; 8 | 9 | public PlayerLeaveEvent(String name) { 10 | super(); 11 | this.name = name; 12 | } 13 | 14 | public String getName() { 15 | return this.name; 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/PlayerMoveEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.entity.MoverType; 5 | 6 | public class PlayerMoveEvent extends GameSenseEvent { 7 | 8 | private MoverType type; 9 | private double x; 10 | private double y; 11 | private double z; 12 | 13 | public PlayerMoveEvent(MoverType moverType, double x, double y, double z) { 14 | super(); 15 | this.type = moverType; 16 | this.x = x; 17 | this.y = y; 18 | this.z = z; 19 | } 20 | 21 | public MoverType getType() { 22 | return this.type; 23 | } 24 | 25 | public void setType(MoverType type) { 26 | this.type = type; 27 | } 28 | 29 | public double getX() { 30 | return this.x; 31 | } 32 | 33 | public double getY() { 34 | return this.y; 35 | } 36 | 37 | public double getZ() { 38 | return this.z; 39 | } 40 | 41 | public void setX(double x) { 42 | this.x = x; 43 | } 44 | 45 | public void setY(double y) { 46 | this.y = y; 47 | } 48 | 49 | public void setZ(double z) { 50 | this.z = z; 51 | } 52 | 53 | public void setVelocity(double x, double y, double z) { 54 | 55 | this.x = x; 56 | this.y = y; 57 | this.z = z; 58 | 59 | } 60 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/ReachDistanceEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class ReachDistanceEvent extends GameSenseEvent { 6 | 7 | private float distance; 8 | 9 | public ReachDistanceEvent(float distance) { 10 | this.distance = distance; 11 | } 12 | 13 | public float getDistance() { 14 | return this.distance; 15 | } 16 | 17 | public void setDistance(float distance) { 18 | this.distance = distance; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/RenderEntityEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.entity.Entity; 5 | 6 | /** 7 | * @author Hoosiers 8 | * @since 12/31/2020 9 | */ 10 | 11 | public class RenderEntityEvent extends GameSenseEvent { 12 | 13 | private final Entity entity; 14 | private final Type type; 15 | 16 | public RenderEntityEvent(Entity entity, Type type) { 17 | this.entity = entity; 18 | this.type = type; 19 | } 20 | 21 | public enum Type { 22 | TEXTURE, 23 | COLOR 24 | } 25 | 26 | public Entity getEntity() { 27 | return this.entity; 28 | } 29 | 30 | public Type getType() { 31 | return this.type; 32 | } 33 | 34 | public static class Head extends RenderEntityEvent { 35 | public Head(Entity entity, Type type) { 36 | super(entity, type); 37 | } 38 | } 39 | 40 | public static class Return extends RenderEntityEvent { 41 | public Return(Entity entity, Type type) { 42 | super(entity, type); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/RenderEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class RenderEvent extends GameSenseEvent { 6 | 7 | private final float partialTicks; 8 | 9 | public RenderEvent(float partialTicks) { 10 | super(); 11 | this.partialTicks = partialTicks; 12 | } 13 | 14 | public float getPartialTicks() { 15 | return this.partialTicks; 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/RenderHand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class RenderHand extends GameSenseEvent { 6 | private final float ticks; 7 | 8 | public RenderHand(float ticks) { 9 | this.ticks = ticks; 10 | } 11 | 12 | public float getPartialTicks() { 13 | return ticks; 14 | } 15 | 16 | 17 | public static class PostOutline extends RenderHand { 18 | public PostOutline(float ticks) { 19 | super(ticks); 20 | } 21 | } 22 | 23 | public static class PreOutline extends RenderHand { 24 | public PreOutline(float ticks) { 25 | super(ticks); 26 | } 27 | } 28 | 29 | public static class PostFill extends RenderHand { 30 | public PostFill(float ticks) { 31 | super(ticks); 32 | } 33 | } 34 | 35 | public static class PreFill extends RenderHand { 36 | public PreFill(float ticks) { 37 | super(ticks); 38 | } 39 | } 40 | 41 | public static class PostBoth extends RenderHand { 42 | public PostBoth(float ticks) { 43 | super(ticks); 44 | } 45 | } 46 | 47 | public static class PreBoth extends RenderHand { 48 | public PreBoth(float ticks) { 49 | super(ticks); 50 | } 51 | } 52 | 53 | 54 | 55 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/SendMessageEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class SendMessageEvent extends GameSenseEvent { 6 | 7 | final String message; 8 | public SendMessageEvent(String message) { 9 | this.message = message; 10 | } 11 | 12 | public String getMessage() { 13 | return message; 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/ShaderColorEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraftforge.fml.common.eventhandler.Cancelable; 6 | 7 | import java.awt.*; 8 | 9 | @Cancelable 10 | public class ShaderColorEvent extends GameSenseEvent { 11 | 12 | private final Entity entity; 13 | private Color color; 14 | 15 | public ShaderColorEvent(Entity entity) { 16 | this.entity = entity; 17 | } 18 | 19 | public Entity getEntity() { 20 | return entity; 21 | } 22 | 23 | public Color getColor() { 24 | return color; 25 | } 26 | 27 | public void setColor(Color in) { 28 | color = in; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/StepEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.math.AxisAlignedBB; 5 | 6 | /** 7 | * @see com.gamesense.mixin.mixins.MixinEntity 8 | * */ 9 | 10 | public class StepEvent extends GameSenseEvent { 11 | 12 | AxisAlignedBB BB; 13 | 14 | public StepEvent(AxisAlignedBB bb) { 15 | super(); 16 | this.BB = bb; 17 | } 18 | 19 | public AxisAlignedBB getBB() { 20 | return BB; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/SwingEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.EnumHand; 5 | 6 | public class SwingEvent extends GameSenseEvent { 7 | 8 | EnumHand hand; 9 | 10 | public SwingEvent(EnumHand enumHand) { 11 | 12 | this.hand = enumHand; 13 | 14 | } 15 | 16 | public void setHand(EnumHand hand) { 17 | this.hand = hand; 18 | } 19 | 20 | public EnumHand getHand() { 21 | return this.hand; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/TotemPopEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.entity.Entity; 5 | 6 | public class TotemPopEvent extends GameSenseEvent { 7 | 8 | private final Entity entity; 9 | 10 | public TotemPopEvent(Entity entity) { 11 | super(); 12 | this.entity = entity; 13 | } 14 | 15 | public Entity getEntity() { 16 | return this.entity; 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/TransformSideFirstPersonEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | import net.minecraft.util.EnumHandSide; 5 | 6 | public class TransformSideFirstPersonEvent extends GameSenseEvent { 7 | 8 | private final EnumHandSide enumHandSide; 9 | 10 | public TransformSideFirstPersonEvent(EnumHandSide enumHandSide) { 11 | this.enumHandSide = enumHandSide; 12 | } 13 | 14 | public EnumHandSide getEnumHandSide() { 15 | return this.enumHandSide; 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/event/events/WaterPushEvent.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.event.events; 2 | 3 | import com.gamesense.api.event.GameSenseEvent; 4 | 5 | public class WaterPushEvent extends GameSenseEvent { 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/Setting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.function.Supplier; 6 | import java.util.stream.Stream; 7 | 8 | import com.gamesense.client.module.Module; 9 | 10 | public abstract class Setting { 11 | 12 | private T value; 13 | private final String name; 14 | private final String configName; 15 | private final Module module; 16 | private Supplier isVisible; 17 | private final List> subSettings=new ArrayList>(); 18 | 19 | public Setting(T value, String name, String configName, Module module, Supplier isVisible) { 20 | this.value = value; 21 | this.name = name; 22 | this.configName = configName; 23 | this.module = module; 24 | this.isVisible = isVisible; 25 | } 26 | 27 | public void setVisible(Supplier vis) { 28 | this.isVisible = vis; 29 | } 30 | 31 | public Setting(T value, String name, Module module) { 32 | this(value,name,name.replace(" ",""),module,()->true); 33 | } 34 | 35 | public T getValue() { 36 | return this.value; 37 | } 38 | 39 | public void setValue(T value) { 40 | this.value = value; 41 | } 42 | 43 | public String getName() { 44 | return this.name; 45 | } 46 | 47 | public String getConfigName() { 48 | return this.configName; 49 | } 50 | 51 | public Module getModule() { 52 | return this.module; 53 | } 54 | 55 | public boolean isVisible() { 56 | return isVisible.get(); 57 | } 58 | 59 | public Stream> getSubSettings() { 60 | return subSettings.stream(); 61 | } 62 | 63 | public void addSubSetting (Setting setting) { 64 | subSettings.add(setting); 65 | } 66 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/SettingsManager.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting; 2 | 3 | import com.gamesense.client.module.Module; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import java.util.stream.Collectors; 8 | 9 | public class SettingsManager { 10 | 11 | private static final ArrayList settings = new ArrayList<>(); 12 | 13 | public static void addSetting(Setting setting) { 14 | settings.add(setting); 15 | } 16 | 17 | public static ArrayList getSettings() { 18 | return settings; 19 | } 20 | 21 | public static List getSettingsForModule(Module module) { 22 | return settings.stream().filter(setting -> setting.getModule().equals(module)).collect(Collectors.toList()); 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/values/BooleanSetting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting.values; 2 | 3 | import java.util.function.Supplier; 4 | 5 | import com.gamesense.api.setting.Setting; 6 | import com.gamesense.client.module.Module; 7 | 8 | public class BooleanSetting extends Setting { 9 | 10 | public BooleanSetting(String name, Module module, boolean value) { 11 | super(value, name, module); 12 | } 13 | 14 | public BooleanSetting(String name, String configName, Module module, Supplier isVisible, boolean value) { 15 | super(value, name, configName, module, isVisible); 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/values/DoubleSetting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting.values; 2 | 3 | import java.util.function.Supplier; 4 | 5 | import com.gamesense.api.setting.Setting; 6 | import com.gamesense.client.module.Module; 7 | 8 | public class DoubleSetting extends Setting { 9 | 10 | private final double min; 11 | private final double max; 12 | 13 | public DoubleSetting(String name, Module module, double value, double min, double max) { 14 | super(value, name, module); 15 | this.min = min; 16 | this.max = max; 17 | } 18 | 19 | public DoubleSetting(String name, String configName, Module module, Supplier isVisible, double value, double min, double max) { 20 | super(value,name,configName,module,isVisible); 21 | this.min = min; 22 | this.max = max; 23 | } 24 | 25 | public double getMin() { 26 | return this.min; 27 | } 28 | 29 | public double getMax() { 30 | return this.max; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/values/IntegerSetting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting.values; 2 | 3 | import java.util.function.Supplier; 4 | 5 | import com.gamesense.api.setting.Setting; 6 | import com.gamesense.client.module.Module; 7 | 8 | public class IntegerSetting extends Setting { 9 | private final int min; 10 | private final int max; 11 | 12 | public IntegerSetting(String name, Module module, int value, int min, int max) { 13 | super(value, name, module); 14 | this.min = min; 15 | this.max = max; 16 | } 17 | 18 | public IntegerSetting(String name, String configName, Module module, Supplier isVisible, int value, int min, int max) { 19 | super(value, name, configName, module, isVisible); 20 | this.min = min; 21 | this.max = max; 22 | } 23 | 24 | public int getMin() { 25 | return this.min; 26 | } 27 | 28 | public int getMax() { 29 | return this.max; 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/values/ModeSetting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting.values; 2 | 3 | import java.util.List; 4 | import java.util.function.Supplier; 5 | 6 | import com.gamesense.api.setting.Setting; 7 | import com.gamesense.client.module.Module; 8 | 9 | public class ModeSetting extends Setting { 10 | private final List modes; 11 | 12 | public ModeSetting(String name, Module module, String value, List modes) { 13 | super(value, name, module); 14 | this.modes = modes; 15 | } 16 | 17 | public ModeSetting(String name, String configName, Module module, String value, Supplier isVisible, List modes) { 18 | super(value, name, configName, module, isVisible); 19 | this.modes = modes; 20 | } 21 | 22 | public List getModes() { 23 | return this.modes; 24 | } 25 | 26 | public void increment() { 27 | int modeIndex = modes.indexOf(getValue()); 28 | modeIndex = (modeIndex + 1) % modes.size(); 29 | setValue(modes.get(modeIndex)); 30 | } 31 | 32 | public void decrement() { 33 | int modeIndex = modes.indexOf(getValue()); 34 | modeIndex-=1; 35 | if (modeIndex<0) modeIndex=modes.size()-1; 36 | setValue(modes.get(modeIndex)); 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/setting/values/StringSetting.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.setting.values; 2 | 3 | import com.gamesense.api.setting.Setting; 4 | import com.gamesense.client.module.Module; 5 | 6 | public class StringSetting extends Setting { 7 | 8 | private String text; 9 | 10 | public StringSetting(String name, Module parent, String text) { 11 | super(text, name, parent); 12 | this.text = text; 13 | } 14 | 15 | public String getText() { 16 | return text; 17 | } 18 | 19 | public void setText(String text) { 20 | this.text = text; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/font/FontUtil.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.font; 2 | 3 | import com.gamesense.api.util.render.GSColor; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.client.Minecraft; 6 | 7 | public class FontUtil { 8 | 9 | private static final Minecraft mc = Minecraft.getMinecraft(); 10 | 11 | public static float drawStringWithShadow(boolean customFont, String text, int x, int y, GSColor color) { 12 | if (customFont) { 13 | return GameSense.INSTANCE.cFontRenderer.drawStringWithShadow(text, x, y, color); 14 | } else { 15 | return mc.fontRenderer.drawStringWithShadow(text, x, y, color.getRGB()); 16 | } 17 | } 18 | 19 | public static int getStringWidth(boolean customFont, String string) { 20 | if (customFont) { 21 | return GameSense.INSTANCE.cFontRenderer.getStringWidth(string); 22 | } else { 23 | return mc.fontRenderer.getStringWidth(string); 24 | } 25 | } 26 | 27 | public static int getFontHeight(boolean customFont) { 28 | if (customFont) { 29 | return GameSense.INSTANCE.cFontRenderer.getHeight(); 30 | } else { 31 | return mc.fontRenderer.FONT_HEIGHT; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/CollectionUtil.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | import java.util.function.ToIntFunction; 4 | 5 | public class CollectionUtil { 6 | 7 | public static T maxOrNull(Iterable iterable, ToIntFunction block) { 8 | int value = Integer.MIN_VALUE; 9 | T maxElement = null; 10 | 11 | for (T element : iterable) { 12 | int newValue = block.applyAsInt(element); 13 | 14 | if (newValue > value) { 15 | value = newValue; 16 | maxElement = element; 17 | } 18 | } 19 | 20 | return maxElement; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/Discord.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | import club.minnced.discord.rpc.DiscordEventHandlers; 4 | import club.minnced.discord.rpc.DiscordRPC; 5 | import club.minnced.discord.rpc.DiscordRichPresence; 6 | import com.gamesense.client.GameSense; 7 | 8 | /** 9 | * @author Hoosiers 10 | * @since 10/27/2020 11 | */ 12 | 13 | public class Discord { 14 | 15 | private static final String discordID = "840996509880680479"; 16 | public static final DiscordRichPresence discordRichPresence = new DiscordRichPresence(); 17 | private static final DiscordRPC discordRPC = DiscordRPC.INSTANCE; 18 | 19 | private static final String clientVersion = GameSense.MODVER; 20 | 21 | public static void startRPC() { 22 | DiscordEventHandlers eventHandlers = new DiscordEventHandlers(); 23 | eventHandlers.disconnected = ((var1, var2) -> System.out.println("Discord RPC disconnected, var1: " + var1 + ", var2: " + var2)); 24 | 25 | discordRPC.Discord_Initialize(discordID, eventHandlers, true, null); 26 | 27 | discordRichPresence.startTimestamp = System.currentTimeMillis() / 1000L; 28 | discordRichPresence.details = clientVersion; 29 | discordRichPresence.largeImageKey = "gs"; 30 | discordRichPresence.largeImageText = "gs++"; 31 | discordRichPresence.state = null; 32 | discordRPC.Discord_UpdatePresence(discordRichPresence); 33 | } 34 | 35 | public static void stopRPC() { 36 | discordRPC.Discord_Shutdown(); 37 | discordRPC.Discord_ClearPresence(); 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/EnumUtils.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | public class EnumUtils { 4 | 5 | public static > T next(T value) { 6 | T[] enumValues = value.getDeclaringClass().getEnumConstants(); 7 | return enumValues[(value.ordinal() + 1) % enumValues.length]; 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/Pair.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | /** 4 | * @author 086 5 | * @on 14/03/2018 6 | */ 7 | 8 | public class Pair { 9 | 10 | T key; 11 | S value; 12 | 13 | public Pair(T key, S value) { 14 | this.key = key; 15 | this.value = value; 16 | } 17 | 18 | public T getKey() { 19 | return key; 20 | } 21 | 22 | public S getValue() { 23 | return value; 24 | } 25 | 26 | public void setKey(T key) { 27 | this.key = key; 28 | } 29 | 30 | public void setValue(S value) { 31 | this.value = value; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/Timer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | public class Timer { 4 | 5 | private long current; 6 | 7 | public Timer() { 8 | this.current = System.currentTimeMillis(); 9 | } 10 | 11 | public boolean hasReached(final long delay) { 12 | return System.currentTimeMillis() - this.current >= delay; 13 | } 14 | 15 | public boolean hasReached(final long delay, boolean reset) { 16 | if (reset) 17 | reset(); 18 | return System.currentTimeMillis() - this.current >= delay; 19 | } 20 | 21 | public void reset() { 22 | this.current = System.currentTimeMillis(); 23 | } 24 | 25 | public long getTimePassed() { 26 | return System.currentTimeMillis() - this.current; 27 | } 28 | 29 | public boolean sleep(final long time) { 30 | if (time() >= time) { 31 | reset(); 32 | return true; 33 | } 34 | return false; 35 | } 36 | 37 | public void setTimer(long time) {this.current = time;} 38 | 39 | public long time() { 40 | return System.currentTimeMillis() - current; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/misc/ZipUtils.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.misc; 2 | 3 | import java.io.*; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import java.util.zip.ZipEntry; 7 | import java.util.zip.ZipOutputStream; 8 | 9 | public final class ZipUtils { 10 | 11 | public static void zip(File source, File dest) { 12 | List list = new ArrayList(); 13 | createFileList(source, source, list); 14 | try { 15 | ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest)); 16 | for (String file : list) { 17 | ZipEntry ze = new ZipEntry(file); 18 | FileInputStream in = new FileInputStream(file); 19 | byte[] buffer = new byte[1024]; 20 | zos.putNextEntry(ze); 21 | while (true) { 22 | int len = in.read(buffer); 23 | if (len <= 0) break; 24 | zos.write(buffer, 0, len); 25 | } 26 | in.close(); 27 | zos.closeEntry(); 28 | } 29 | zos.close(); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | } 33 | } 34 | 35 | private static void createFileList(File file, File source, List list) { 36 | if (file.isFile()) { 37 | list.add(file.getPath()); 38 | } else if (file.isDirectory()) { 39 | for (String subfile : file.list()) { 40 | createFileList(new File(file, subfile), source, list); 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/player/NameUtil.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.player; 2 | 3 | import com.google.common.collect.Maps; 4 | import org.apache.commons.io.IOUtils; 5 | import org.json.simple.JSONArray; 6 | import org.json.simple.JSONObject; 7 | import org.json.simple.JSONValue; 8 | 9 | import java.net.URL; 10 | import java.util.Map; 11 | 12 | public class NameUtil { 13 | 14 | private static final Map uuidNameCache = Maps.newConcurrentMap(); 15 | 16 | public static String resolveName(String uuid) { 17 | uuid = uuid.replace("-", ""); 18 | if (uuidNameCache.containsKey(uuid)) { 19 | return uuidNameCache.get(uuid); 20 | } 21 | 22 | final String url = "https://api.mojang.com/user/profiles/" + uuid + "/names"; 23 | try { 24 | final String nameJson = IOUtils.toString(new URL(url)); 25 | if (nameJson != null && nameJson.length() > 0) { 26 | final JSONArray jsonArray = (JSONArray) JSONValue.parseWithException(nameJson); 27 | if (jsonArray != null) { 28 | final JSONObject latestName = (JSONObject) jsonArray.get(jsonArray.size() - 1); 29 | if (latestName != null) { 30 | return latestName.get("name").toString(); 31 | } 32 | } 33 | } 34 | } catch (Exception e) { 35 | e.printStackTrace(); 36 | } 37 | 38 | return null; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/player/PlayerPacket.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.player; 2 | 3 | import com.gamesense.client.module.Module; 4 | import net.minecraft.util.math.Vec2f; 5 | import net.minecraft.util.math.Vec3d; 6 | 7 | public class PlayerPacket { 8 | 9 | private final int priority; 10 | 11 | private final Vec3d position; 12 | private final Vec2f rotation; 13 | 14 | public PlayerPacket(Module module, Vec2f rotation) { 15 | this(module, null, rotation); 16 | } 17 | 18 | public PlayerPacket(Module module, Vec3d position) { 19 | this(module, position, null); 20 | } 21 | 22 | public PlayerPacket(Module module, Vec3d position, Vec2f rotation) { 23 | this(module.getPriority(), position, rotation); 24 | } 25 | 26 | private PlayerPacket(int priority, Vec3d position, Vec2f rotation) { 27 | this.priority = priority; 28 | this.position = position; 29 | this.rotation = rotation; 30 | } 31 | 32 | public int getPriority() { 33 | return priority; 34 | } 35 | 36 | public Vec3d getPosition() { 37 | return position; 38 | } 39 | 40 | public Vec2f getRotation() { 41 | return rotation; 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/player/social/Enemy.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.player.social; 2 | 3 | public class Enemy { 4 | 5 | private final String name; 6 | 7 | public Enemy(String name) { 8 | this.name = name; 9 | } 10 | 11 | public String getName() { 12 | return this.name; 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/player/social/Friend.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.player.social; 2 | 3 | public class Friend { 4 | 5 | private final String name; 6 | 7 | public Friend(String name) { 8 | this.name = name; 9 | } 10 | 11 | public String getName() { 12 | return this.name; 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/player/social/SpecialNames.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.player.social; 2 | 3 | public class SpecialNames { 4 | 5 | private final String name; 6 | 7 | public SpecialNames(String name) { 8 | this.name = name; 9 | } 10 | 11 | public String getName() { 12 | return this.name; 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/render/CapeUtil.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.render; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.util.ResourceLocation; 5 | import net.minecraft.client.renderer.texture.DynamicTexture; 6 | 7 | import javax.imageio.ImageIO; 8 | import java.io.BufferedReader; 9 | import java.io.InputStreamReader; 10 | import java.net.URL; 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import java.util.UUID; 14 | 15 | public class CapeUtil { 16 | 17 | private static final List uuids = new ArrayList<>(); 18 | public static final List capes = new ArrayList<>(); 19 | private static final Minecraft mc = Minecraft.getMinecraft(); 20 | 21 | public static void init() { 22 | 23 | try { 24 | capes.add(mc.getTextureManager().getDynamicTextureLocation("black", new DynamicTexture(ImageIO.read(new URL("https://i.toxicaven.dev/Bm11ZriMSjHn/direct.png"))))); 25 | capes.add(mc.getTextureManager().getDynamicTextureLocation("white", new DynamicTexture(ImageIO.read(new URL("https://i.toxicaven.dev/hiHyRHocHDQD/direct.png"))))); 26 | capes.add(mc.getTextureManager().getDynamicTextureLocation("amber", new DynamicTexture(ImageIO.read(new URL("https://i.toxicaven.dev/2XtPEM75HImX/direct.png"))))); 27 | URL capesList = new URL("https://raw.githubusercontent.com/TechAle/gsplusplus-assets/main/capeslist.txt"); 28 | BufferedReader in = new BufferedReader(new InputStreamReader(capesList.openStream())); 29 | String inputLine; 30 | while ((inputLine = in.readLine()) != null) { 31 | uuids.add(UUID.fromString(inputLine)); 32 | } 33 | } catch (Exception e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | 38 | public static boolean hasCape(UUID id) { 39 | return uuids.contains(id); 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/render/Chams.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.render; 2 | 3 | import net.minecraft.client.renderer.OpenGlHelper; 4 | import org.lwjgl.opengl.GL11; 5 | 6 | import static org.lwjgl.opengl.GL11.glEnable; 7 | import static org.lwjgl.opengl.GL11.glHint; 8 | 9 | public class Chams { 10 | 11 | public static void renderOne(final float lineWidth) { 12 | GL11.glPushAttrib(1048575); 13 | GL11.glDisable(3008); 14 | GL11.glDisable(3553); 15 | GL11.glDisable(2896); 16 | glEnable(3042); 17 | GL11.glBlendFunc(770, 771); 18 | GL11.glLineWidth(lineWidth); 19 | glEnable(2848); 20 | glEnable(2960); 21 | GL11.glClear(1024); 22 | GL11.glClearStencil(15); 23 | GL11.glStencilFunc(512, 1, 15); 24 | GL11.glStencilOp(7681, 7681, 7681); 25 | GL11.glPolygonMode(1032, 6913); 26 | } 27 | 28 | public static void renderTwo() { 29 | GL11.glStencilFunc(512, 0, 15); 30 | GL11.glStencilOp(7681, 7681, 7681); 31 | GL11.glPolygonMode(1032, 6914); 32 | } 33 | 34 | public static void renderThree() { 35 | GL11.glStencilFunc(514, 1, 15); 36 | GL11.glStencilOp(7680, 7680, 7680); 37 | GL11.glPolygonMode(1032, 6913); 38 | } 39 | 40 | public static void renderFour(final GSColor color) { 41 | //color.glColor(); 42 | GL11.glDepthMask(false); 43 | GL11.glDisable(2929); 44 | glEnable(10754); 45 | GL11.glPolygonOffset(1.0f, -2000000.0f); 46 | OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f); 47 | } 48 | 49 | public static void renderFive() { 50 | GL11.glPolygonOffset(1.0f, 2000000.0f); 51 | GL11.glDisable(10754); 52 | glEnable(2929); 53 | GL11.glDepthMask(true); 54 | GL11.glDisable(2960); 55 | GL11.glDisable(2848); 56 | glHint(3154, 4352); 57 | glEnable(3042); 58 | glEnable(2896); 59 | glEnable(3553); 60 | glEnable(3008); 61 | GL11.glPopAttrib(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/render/GSColor.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.render; 2 | 3 | import net.minecraft.client.renderer.GlStateManager; 4 | 5 | import java.awt.*; 6 | 7 | /** 8 | * @author lukflug 9 | */ 10 | 11 | public class GSColor extends Color { 12 | 13 | private static final long serialVersionUID = 1L; 14 | 15 | public GSColor(int rgb) { 16 | super(rgb); 17 | } 18 | 19 | public GSColor(int rgba, boolean hasalpha) { 20 | super(rgba, hasalpha); 21 | } 22 | 23 | public GSColor(int r, int g, int b) { 24 | super(r, g, b); 25 | } 26 | 27 | public GSColor(int r, int g, int b, int a) { 28 | super(r, g, b, a); 29 | } 30 | 31 | public GSColor(Color color) { 32 | super(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); 33 | } 34 | 35 | public GSColor(GSColor color, int a) { 36 | super(color.getRed(), color.getGreen(), color.getBlue(), a); 37 | } 38 | 39 | public static GSColor fromHSB(float hue, float saturation, float brightness) { 40 | return new GSColor(Color.getHSBColor(hue, saturation, brightness)); 41 | } 42 | 43 | public float getHue() { 44 | return RGBtoHSB(getRed(), getGreen(), getBlue(), null)[0]; 45 | } 46 | 47 | public float getSaturation() { 48 | return RGBtoHSB(getRed(), getGreen(), getBlue(), null)[1]; 49 | } 50 | 51 | public float getBrightness() { 52 | return RGBtoHSB(getRed(), getGreen(), getBlue(), null)[2]; 53 | } 54 | 55 | public void glColor() { 56 | GlStateManager.color(getRed() / 255.0f, getGreen() / 255.0f, getBlue() / 255.0f, getAlpha() / 255.0f); 57 | } 58 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/world/GeometryMasks.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.world; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | 5 | import java.util.HashMap; 6 | 7 | public final class GeometryMasks { 8 | 9 | public static final HashMap FACEMAP = new HashMap<>(); 10 | 11 | static { 12 | FACEMAP.put(EnumFacing.DOWN, Quad.DOWN); 13 | FACEMAP.put(EnumFacing.WEST, Quad.WEST); 14 | FACEMAP.put(EnumFacing.NORTH, Quad.NORTH); 15 | FACEMAP.put(EnumFacing.SOUTH, Quad.SOUTH); 16 | FACEMAP.put(EnumFacing.EAST, Quad.EAST); 17 | FACEMAP.put(EnumFacing.UP, Quad.UP); 18 | } 19 | 20 | public static final class Quad { 21 | public static final int DOWN = 0x01; 22 | public static final int UP = 0x02; 23 | public static final int NORTH = 0x04; 24 | public static final int SOUTH = 0x08; 25 | public static final int WEST = 0x10; 26 | public static final int EAST = 0x20; 27 | public static final int ALL = DOWN | UP | NORTH | SOUTH | WEST | EAST; 28 | } 29 | 30 | public static final class Line { 31 | public static final int DOWN_WEST = 0x11; 32 | public static final int UP_WEST = 0x12; 33 | public static final int DOWN_EAST = 0x21; 34 | public static final int UP_EAST = 0x22; 35 | public static final int DOWN_NORTH = 0x05; 36 | public static final int UP_NORTH = 0x06; 37 | public static final int DOWN_SOUTH = 0x09; 38 | public static final int UP_SOUTH = 0x0A; 39 | public static final int NORTH_WEST = 0x14; 40 | public static final int NORTH_EAST = 0x24; 41 | public static final int SOUTH_WEST = 0x18; 42 | public static final int SOUTH_EAST = 0x28; 43 | public static final int ALL = DOWN_WEST | UP_WEST | DOWN_EAST | UP_EAST | DOWN_NORTH | UP_NORTH | DOWN_SOUTH | UP_SOUTH | NORTH_WEST | NORTH_EAST | SOUTH_WEST | SOUTH_EAST; 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/world/combat/ac/CrystalInfo.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.world.combat.ac; 2 | 3 | import net.minecraft.entity.item.EntityEnderCrystal; 4 | import net.minecraft.entity.player.EntityPlayer; 5 | import net.minecraft.util.math.BlockPos; 6 | 7 | public class CrystalInfo { 8 | public final float damage; 9 | public final PlayerInfo target; 10 | 11 | private CrystalInfo(float damage, PlayerInfo target) { 12 | this.damage = damage; 13 | this.target = target; 14 | 15 | } 16 | 17 | public static class BreakInfo extends CrystalInfo { 18 | public final EntityEnderCrystal crystal; 19 | 20 | public BreakInfo(float damage, PlayerInfo target, EntityEnderCrystal crystal) { 21 | super(damage, target); 22 | this.crystal = crystal; 23 | } 24 | } 25 | 26 | public static class NewBreakInfo extends CrystalInfo { 27 | public final EntityEnderCrystal crystal; 28 | public final double distance; 29 | 30 | public NewBreakInfo(float damage, PlayerInfo target, EntityEnderCrystal crystal, double distance) { 31 | super(damage, target); 32 | this.crystal = crystal; 33 | this.distance = distance; 34 | } 35 | } 36 | 37 | public static class PlaceInfo extends CrystalInfo { 38 | public final BlockPos crystal; 39 | public final double distance; 40 | 41 | public PlaceInfo(float damage, PlayerInfo target, BlockPos crystal, double distance) { 42 | super(damage, target); 43 | this.crystal = crystal; 44 | this.distance = distance; 45 | } 46 | 47 | public EntityPlayer getTarget() { 48 | return this.target.entity; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/world/combat/ac/PositionInfo.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.world.combat.ac; 2 | 3 | import net.minecraft.entity.item.EntityEnderCrystal; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | public class PositionInfo { 7 | 8 | public BlockPos pos; 9 | public EntityEnderCrystal crystal; 10 | private final double selfDamage; 11 | public double getSelfDamage() { 12 | return this.selfDamage; 13 | } 14 | public double rapp; 15 | public double damage; 16 | public double distance; 17 | public double distancePlayer; 18 | 19 | public PositionInfo(BlockPos pos, double selfDamage) { 20 | this.pos = pos; 21 | this.selfDamage = selfDamage; 22 | } 23 | 24 | public PositionInfo(EntityEnderCrystal pos, double selfDamage) { 25 | this.crystal = pos; 26 | this.selfDamage = selfDamage; 27 | } 28 | 29 | 30 | public PositionInfo() { 31 | this.pos = null; 32 | this.selfDamage = 100; 33 | this.damage = 0; 34 | this.rapp = 100; 35 | this.distancePlayer = 100; 36 | } 37 | 38 | public void setEnemyDamage(double damage) { 39 | this.rapp = ((this.damage = damage) / this.selfDamage); 40 | } 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/api/util/world/combat/ac/threads/ACSubThread.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.api.util.world.combat.ac.threads; 2 | 3 | import com.gamesense.api.util.world.combat.ac.ACSettings; 4 | import com.gamesense.api.util.world.combat.ac.ACUtil; 5 | import com.gamesense.api.util.world.combat.ac.CrystalInfo; 6 | import com.gamesense.api.util.world.combat.ac.PlayerInfo; 7 | import net.minecraft.util.math.BlockPos; 8 | 9 | import java.util.List; 10 | import java.util.concurrent.Callable; 11 | 12 | public class ACSubThread implements Callable { 13 | private final ACSettings settings; 14 | 15 | private final List possibleLocations; 16 | private final PlayerInfo target; 17 | 18 | public ACSubThread(ACSettings setting, List possibleLocations, PlayerInfo target) { 19 | this.settings = setting; 20 | 21 | this.possibleLocations = possibleLocations; 22 | this.target = target; 23 | } 24 | 25 | @Override 26 | public CrystalInfo.PlaceInfo call() { 27 | return getPlacement(); 28 | } 29 | 30 | private CrystalInfo.PlaceInfo getPlacement() { 31 | if (possibleLocations == null) { 32 | return null; 33 | } 34 | 35 | return ACUtil.calculateBestPlacement(settings, target, possibleLocations); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/clickgui/TextFieldKeys.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.clickgui; 2 | 3 | import com.lukflug.panelstudio.widget.ITextFieldKeys; 4 | import org.lwjgl.input.Keyboard; 5 | 6 | public class TextFieldKeys implements ITextFieldKeys { 7 | @Override 8 | public boolean isBackspaceKey(int scancode) { 9 | return scancode == Keyboard.KEY_BACK; 10 | } 11 | 12 | @Override 13 | public boolean isDeleteKey(int scancode) { 14 | return scancode == Keyboard.KEY_DELETE; 15 | } 16 | 17 | @Override 18 | public boolean isInsertKey(int scancode) { 19 | return scancode == Keyboard.KEY_INSERT; 20 | } 21 | 22 | @Override 23 | public boolean isLeftKey(int scancode) { 24 | return scancode == Keyboard.KEY_LEFT; 25 | } 26 | 27 | @Override 28 | public boolean isRightKey(int scancode) { 29 | return scancode == Keyboard.KEY_RIGHT; 30 | } 31 | 32 | @Override 33 | public boolean isHomeKey(int scancode) { 34 | return scancode == Keyboard.KEY_HOME; 35 | } 36 | 37 | @Override 38 | public boolean isEndKey(int scancode) { 39 | return scancode == Keyboard.KEY_END; 40 | } 41 | 42 | @Override 43 | public boolean isCopyKey(int scancode) { 44 | return scancode == Keyboard.KEY_C; 45 | } 46 | 47 | @Override 48 | public boolean isPasteKey(int scancode) { 49 | return scancode == Keyboard.KEY_V; 50 | } 51 | 52 | @Override 53 | public boolean isCutKey(int scancode) { 54 | return scancode == Keyboard.KEY_X; 55 | } 56 | 57 | @Override 58 | public boolean isAllKey(int scancode) { 59 | return scancode == Keyboard.KEY_A; 60 | } 61 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/Command.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command; 2 | 3 | import net.minecraft.client.Minecraft; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * @Author Hoosiers on 11/04/2020 12 | */ 13 | 14 | public abstract class Command { 15 | 16 | protected static final Minecraft mc = Minecraft.getMinecraft(); 17 | 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Target(ElementType.TYPE) 20 | public @interface Declaration { 21 | String name(); 22 | 23 | String syntax(); 24 | 25 | String[] alias(); 26 | } 27 | 28 | private Declaration getDeclaration() { 29 | return getClass().getAnnotation(Declaration.class); 30 | } 31 | 32 | private final String name = getDeclaration().name(); 33 | private final String[] alias = getDeclaration().alias(); 34 | private final String syntax = getDeclaration().syntax(); 35 | 36 | public String getName() { 37 | return this.name; 38 | } 39 | 40 | public String getSyntax() { 41 | return CommandManager.getCommandPrefix() + this.syntax; 42 | } 43 | 44 | public String[] getAlias() { 45 | return this.alias; 46 | } 47 | 48 | public abstract void onCommand(String command, String[] message); 49 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/AutoGGCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.modules.misc.AutoGG; 6 | 7 | /** 8 | * @Author Hoosiers on 11/04/2020 9 | */ 10 | 11 | @Command.Declaration(name = "AutoGG", syntax = "autogg add/del [message] (use _ for spaces)", alias = {"autogg", "gg"}) 12 | public class AutoGGCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0]; 16 | String value = message[1].replace("_", " "); 17 | 18 | if (main.equalsIgnoreCase("add") && !(AutoGG.getAutoGgMessages().contains(value))) { 19 | AutoGG.addAutoGgMessage(value); 20 | MessageBus.sendCommandMessage("Added AutoGG message: " + value + "!", true); 21 | } else if (main.equalsIgnoreCase("del") && AutoGG.getAutoGgMessages().contains(value)) { 22 | AutoGG.getAutoGgMessages().remove(value); 23 | MessageBus.sendCommandMessage("Deleted AutoGG message: " + value + "!", true); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/AutoReplyCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.modules.misc.AutoReply; 6 | 7 | /** 8 | * @Author Hoosiers on 11/04/2020 9 | */ 10 | 11 | @Command.Declaration(name = "AutoReply", syntax = "autoreply set [message] (use _ for spaces)", alias = {"autoreply", "reply"}) 12 | public class AutoReplyCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0]; 16 | String value = message[1].replace("_", " "); 17 | 18 | if (main.equalsIgnoreCase("set")) { 19 | AutoReply.setReply(value); 20 | MessageBus.sendCommandMessage("Set AutoReply message: " + value + "!", true); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/AutoRespawnCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.modules.misc.AutoRespawn; 6 | 7 | @Command.Declaration(name = "AutoRespawn", syntax = "autorespawn get/set [message] (do NOT use _ for spaces)", alias = {"autorespawn", "respawn"}) 8 | public class AutoRespawnCommand extends Command { 9 | 10 | public void onCommand(String command, String[] message) { 11 | String main = message[0]; 12 | 13 | if (main.equalsIgnoreCase("get")) { 14 | MessageBus.sendCommandMessage("AutoRespawn message is: " + AutoRespawn.getAutoRespawnMessages() + "!", true); 15 | return; 16 | } 17 | 18 | StringBuilder stringBuilder = new StringBuilder(); 19 | for (int i = 1; i < message.length; i++) { 20 | stringBuilder.append(message[i]); 21 | stringBuilder.append(" "); 22 | } 23 | stringBuilder.deleteCharAt(stringBuilder.length() - 1); 24 | 25 | String value = stringBuilder.toString(); 26 | 27 | if (main.equalsIgnoreCase("set") && !(AutoRespawn.getAutoRespawnMessages().equals(value))) { 28 | AutoRespawn.setAutoRespawnMessage(value); 29 | MessageBus.sendCommandMessage("Set AutoRespawn message to: " + value + "!", true); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/BackupConfigCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.api.util.misc.ZipUtils; 5 | import com.gamesense.client.GameSense; 6 | import com.gamesense.client.command.Command; 7 | 8 | import java.io.File; 9 | import java.text.SimpleDateFormat; 10 | import java.util.Date; 11 | 12 | @Command.Declaration(name = "BackupConfig", syntax = "backupconfig", alias = {"backupconfig"}) 13 | public class BackupConfigCommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | String filename = "gamesense-cofig-backup-" + GameSense.MODVER + "-" + new SimpleDateFormat("yyyyMMdd.HHmmss.SSS").format(new Date()) + ".zip"; 17 | ZipUtils.zip(new File("GameSense/"), new File(filename)); 18 | MessageBus.sendCommandMessage("Config successfully saved in " + filename + "!", true); 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/BindCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | import org.lwjgl.input.Keyboard; 8 | 9 | /** 10 | * @Author Hoosiers on 11/05/2020 11 | */ 12 | 13 | @Command.Declaration(name = "Bind", syntax = "bind [module] key", alias = {"bind", "b", "setbind", "key"}) 14 | public class BindCommand extends Command { 15 | 16 | public void onCommand(String command, String[] message) { 17 | String main = message[0]; 18 | String value = message[1].toUpperCase(); 19 | 20 | for (Module module : ModuleManager.getModules()) { 21 | if (module.getName().equalsIgnoreCase(main)) { 22 | if (value.equalsIgnoreCase("none")) { 23 | module.setBind(Keyboard.KEY_NONE); 24 | MessageBus.sendCommandMessage("Module " + module.getName() + " bind set to: " + value + "!", true); 25 | } 26 | //keeps people from accidentally binding things such as ESC, TAB, exc. 27 | else if (value.length() == 1) { 28 | int key = Keyboard.getKeyIndex(value); 29 | 30 | module.setBind(key); 31 | MessageBus.sendCommandMessage("Module " + module.getName() + " bind set to: " + value + "!", true); 32 | } else if (value.length() > 1) { 33 | MessageBus.sendCommandMessage(this.getSyntax(), true); 34 | } 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/CmdListCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.command.CommandManager; 6 | 7 | /** 8 | * @Author Hoosiers on 11/05/2020 9 | */ 10 | 11 | @Command.Declaration(name = "Commands", syntax = "commands", alias = {"commands", "cmd", "command", "commandlist", "help"}) 12 | public class CmdListCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | for (Command command1 : CommandManager.getCommands()) { 16 | MessageBus.sendCommandMessage(command1.getName() + ": " + "\"" + command1.getSyntax() + "\"!", true); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/DisableAllCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | 8 | /** 9 | * @Author Hoosiers on 11/05/2020 10 | */ 11 | 12 | @Command.Declaration(name = "DisableAll", syntax = "disableall", alias = {"disableall", "stop"}) 13 | public class DisableAllCommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | int count = 0; 17 | 18 | for (Module module : ModuleManager.getModules()) { 19 | if (module.isEnabled()) { 20 | module.disable(); 21 | count++; 22 | } 23 | } 24 | 25 | MessageBus.sendCommandMessage("Disabled " + count + " modules!", true); 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/DrawnCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | 8 | /** 9 | * @Author Hoosiers on 11/05/2020 10 | */ 11 | 12 | @Command.Declaration(name = "Drawn", syntax = "drawn [module]", alias = {"drawn", "shown"}) 13 | public class DrawnCommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | String main = message[0]; 17 | 18 | Module module = ModuleManager.getModule(main); 19 | 20 | if (module == null) { 21 | MessageBus.sendCommandMessage(this.getSyntax(), true); 22 | return; 23 | } 24 | 25 | if (module.isDrawn()) { 26 | module.setDrawn(false); 27 | MessageBus.sendCommandMessage("Module " + module.getName() + " drawn set to: FALSE!", true); 28 | } else if (!module.isDrawn()) { 29 | module.setDrawn(true); 30 | MessageBus.sendCommandMessage("Module " + module.getName() + " drawn set to: TRUE!", true); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/EnemyCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.api.util.player.social.SocialManager; 5 | import com.gamesense.client.command.Command; 6 | 7 | /** 8 | * @Author Hoosiers on 11/05/2020 9 | */ 10 | 11 | @Command.Declaration(name = "Enemy", syntax = "enemy list/add/del [player]", alias = {"enemy", "enemies", "e"}) 12 | public class EnemyCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0]; 16 | 17 | if (main.equalsIgnoreCase("list")) { 18 | MessageBus.sendClientPrefixMessage("Enemies: " + SocialManager.getEnemiesByName() + "!"); 19 | return; 20 | } 21 | 22 | String value = message[1]; 23 | 24 | if (main.equalsIgnoreCase("add") && !SocialManager.isEnemy(value)) { 25 | SocialManager.addEnemy(value); 26 | MessageBus.sendCommandMessage("Added enemy: " + value.toUpperCase() + "!", true); 27 | } else if (main.equalsIgnoreCase("del") && SocialManager.isEnemy(value)) { 28 | SocialManager.delEnemy(value); 29 | MessageBus.sendCommandMessage("Deleted enemy: " + value.toUpperCase() + "!", true); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/FixGUICommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.GameSense; 5 | import com.gamesense.client.clickgui.GameSenseGUI; 6 | import com.gamesense.client.command.Command; 7 | 8 | /** 9 | * @Author Hoosiers on 11/05/2020 10 | */ 11 | 12 | @Command.Declaration(name = "FixGUI", syntax = "fixgui", alias = {"fixgui", "gui", "resetgui"}) 13 | public class FixGUICommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | GameSense.INSTANCE.gameSenseGUI = new GameSenseGUI(); 17 | MessageBus.sendCommandMessage("ClickGUI positions reset!", true); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/FixHUDCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.HUDModule; 6 | import com.gamesense.client.module.Module; 7 | import com.gamesense.client.module.ModuleManager; 8 | 9 | @Command.Declaration(name = "FixHUD", syntax = "fixhud", alias = {"fixhud", "hud", "resethud"}) 10 | public class FixHUDCommand extends Command { 11 | 12 | @Override 13 | public void onCommand(String command, String[] message) { 14 | for (Module module : ModuleManager.getModules()) { 15 | if (module instanceof HUDModule) { 16 | ((HUDModule) module).resetPosition(); 17 | } 18 | } 19 | MessageBus.sendCommandMessage("HUD positions reset!", true); 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/FontCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.font.CFontRenderer; 4 | import com.gamesense.api.util.misc.MessageBus; 5 | import com.gamesense.client.GameSense; 6 | import com.gamesense.client.command.Command; 7 | 8 | import java.awt.*; 9 | 10 | /** 11 | * @Author Hoosiers on 11/05/2020 12 | */ 13 | 14 | @Command.Declaration(name = "Font", syntax = "font [name] size (use _ for spaces)", alias = {"font", "setfont", "customfont", "fonts", "chatfont"}) 15 | public class FontCommand extends Command { 16 | 17 | public void onCommand(String command, String[] message) { 18 | String main = message[0].replace("_", " "); 19 | int value = Integer.parseInt(message[1]); 20 | 21 | if (value >= 21 || value <= 15) { 22 | value = 18; 23 | } 24 | 25 | GameSense.INSTANCE.cFontRenderer = new CFontRenderer(new Font(main, Font.PLAIN, value), true, true); 26 | GameSense.INSTANCE.cFontRenderer.setFontName(main); 27 | GameSense.INSTANCE.cFontRenderer.setFontSize(value); 28 | 29 | MessageBus.sendCommandMessage("Font set to: " + main.toUpperCase() + ", size " + value + "!", true); 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/FriendCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.api.util.player.social.SocialManager; 5 | import com.gamesense.client.command.Command; 6 | 7 | /** 8 | * @Author Hoosiers on 11/05/2020 9 | */ 10 | 11 | @Command.Declaration(name = "Friend", syntax = "friend list/add/del [player]", alias = {"friend", "friends", "f"}) 12 | public class FriendCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0]; 16 | 17 | if (main.equalsIgnoreCase("list")) { 18 | MessageBus.sendClientPrefixMessage("Friends: " + SocialManager.getFriendsByName() + "!"); 19 | return; 20 | } 21 | 22 | String value = message[1]; 23 | 24 | if (main.equalsIgnoreCase("add") && !SocialManager.isFriendForce(value)) { 25 | SocialManager.addFriend(value); 26 | MessageBus.sendCommandMessage("Added friend: " + value.toUpperCase() + "!", true); 27 | } else if (main.equalsIgnoreCase("del") && SocialManager.isFriendForce(value)) { 28 | SocialManager.delFriend(value); 29 | MessageBus.sendCommandMessage("Deleted friend: " + value.toUpperCase() + "!", true); 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/HClipCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.ModuleManager; 6 | import com.gamesense.client.module.modules.gui.ColorMain; 7 | import net.minecraft.util.math.Vec3d; 8 | 9 | @Command.Declaration(name = "HorizontalClip", syntax = "HClip [Distance]", alias = {"hclip", "hc", "forward", "fwd", "chineseComunistParty"}) 10 | public class HClipCommand extends Command { 11 | 12 | double amount; 13 | 14 | @Override 15 | public void onCommand(String command, String[] message) { 16 | 17 | if (mc.player != null) { 18 | 19 | String main = message[0]; 20 | 21 | try { 22 | amount = Double.parseDouble(main); 23 | if (amount >= 0){ 24 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getEnabledColor() + "Clipped the player " + amount + " blocks forward.", true); 25 | } else 26 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getEnabledColor() + "Clipped the player " + -amount + " blocks backward.", true); 27 | 28 | final Vec3d dir = new Vec3d(Math.cos((mc.player.rotationYaw + 90f) * Math.PI / 180.0f), 0, Math.sin((mc.player.rotationYaw + 90f) * Math.PI / 180.0f)); 29 | 30 | mc.player.setPosition(mc.player.posX + dir.x * amount, mc.player.posY, mc.player.posZ + dir.z * amount); 31 | 32 | } catch (NumberFormatException e) { 33 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getDisabledColor() + "You moron, you absolute buffoon, how do you mess up entering a number into a command, you philistine!", true); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/ModulesCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.client.command.Command; 4 | import com.gamesense.client.command.CommandManager; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | import com.mojang.realmsclient.gui.ChatFormatting; 8 | import net.minecraft.util.text.Style; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraft.util.text.event.ClickEvent; 11 | import net.minecraft.util.text.event.HoverEvent; 12 | 13 | import java.util.Collection; 14 | 15 | /** 16 | * @author Hoosiers on 11/05/2020 17 | * @author Seth for Seppuku 18 | */ 19 | 20 | @Command.Declaration(name = "Modules", syntax = "modules (click to toggle)", alias = {"modules", "module", "modulelist", "mod", "mods"}) 21 | public class ModulesCommand extends Command { 22 | 23 | public void onCommand(String command, String[] message) { 24 | TextComponentString msg = new TextComponentString("\2477Modules: " + "\247f "); 25 | 26 | Collection modules = ModuleManager.getModules(); 27 | int size = modules.size(); 28 | int index = 0; 29 | 30 | for (Module module : modules) { 31 | msg.appendSibling(new TextComponentString((module.isEnabled() ? ChatFormatting.GREEN : ChatFormatting.RED) + module.getName() + "\2477" + ((index == size - 1) ? "" : ", ")) 32 | .setStyle(new Style() 33 | .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString(module.getCategory().name()))) 34 | .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, CommandManager.getCommandPrefix() + "toggle" + " " + module.getName())))); 35 | 36 | index++; 37 | } 38 | 39 | msg.appendSibling(new TextComponentString(ChatFormatting.GRAY + "!")); 40 | mc.ingameGUI.getChatGUI().printChatMessage(msg); 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/MsgsCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | 8 | /** 9 | * @author Hoosiers 10 | * @since 03/09/2021 11 | *

12 | * Shout out to lyneez because I had to close his PR :C 13 | */ 14 | 15 | @Command.Declaration(name = "Msgs", syntax = "msgs [module]", alias = {"msgs", "togglemsgs", "showmsgs", "messages"}) 16 | public class MsgsCommand extends Command { 17 | 18 | 19 | public void onCommand(String command, String[] message) { 20 | String main = message[0]; 21 | 22 | Module module = ModuleManager.getModule(main); 23 | 24 | if (module == null) { 25 | MessageBus.sendCommandMessage(this.getSyntax(), true); 26 | return; 27 | } 28 | 29 | if (module.isToggleMsg()) { 30 | module.setToggleMsg(false); 31 | MessageBus.sendCommandMessage("Module " + module.getName() + " message toggle set to: FALSE!", true); 32 | } else if (!module.isToggleMsg()) { 33 | module.setToggleMsg(true); 34 | MessageBus.sendCommandMessage("Module " + module.getName() + " message toggle set to: TRUE!", true); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/OpenFolderCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.config.SaveConfig; 4 | import com.gamesense.api.util.misc.MessageBus; 5 | import com.gamesense.client.command.Command; 6 | 7 | import java.awt.*; 8 | import java.io.File; 9 | import java.io.IOException; 10 | 11 | /** 12 | * @Author Hoosiers on 11/05/2020 13 | */ 14 | 15 | @Command.Declaration(name = "OpenFolder", syntax = "openfolder", alias = {"openfolder", "config", "open", "folder"}) 16 | public class OpenFolderCommand extends Command { 17 | 18 | public void onCommand(String command, String[] message) { 19 | try { 20 | Desktop.getDesktop().open(new File(SaveConfig.fileName.replace("/", ""))); 21 | MessageBus.sendCommandMessage("Opened config folder!", true); 22 | } catch (IOException e) { 23 | MessageBus.sendCommandMessage("Could not open config folder!", true); 24 | e.printStackTrace(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/PingCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | 6 | import java.util.Objects; 7 | 8 | @Command.Declaration(name = "Ping", syntax = "Ping [player]", alias = {"ping", "ms", "latency", "lag"}) 9 | public class PingCommand extends Command { 10 | @Override 11 | public void onCommand(String command, String[] message) { 12 | 13 | String pl = message[0]; 14 | 15 | if (!pl.equals(mc.player.getName())) { 16 | try { 17 | MessageBus.sendClientPrefixMessage(Objects.requireNonNull(mc.world.getPlayerEntityByName(pl)).getName() + " Has " + mc.getConnection().getPlayerInfo(pl).getResponseTime() + "ms"); 18 | } catch (NullPointerException ignored) { 19 | MessageBus.sendClientPrefixMessage("Invalid Player"); 20 | } 21 | } else { 22 | 23 | try { 24 | MessageBus.sendClientPrefixMessage("You have no idea what your ms is trol"); 25 | } catch (NullPointerException ignored) { 26 | MessageBus.sendClientPrefixMessage("Invalid Player"); 27 | } 28 | 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/PrefixCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.command.CommandManager; 6 | 7 | /** 8 | * @Author Hoosiers on 11/05/2020 9 | */ 10 | 11 | @Command.Declaration(name = "Prefix", syntax = "prefix value (no letters or numbers)", alias = {"prefix", "setprefix", "cmdprefix", "commandprefix"}) 12 | public class PrefixCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0].toUpperCase().replaceAll("[a-zA-Z0-9]", null); 16 | int size = message[0].length(); 17 | 18 | if (main != null && size == 1) { 19 | CommandManager.setCommandPrefix(main); 20 | MessageBus.sendCommandMessage("Prefix set: \"" + main + "\"!", true); 21 | } else if (size != 1) { 22 | MessageBus.sendCommandMessage(this.getSyntax(), true); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/ReleasesCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | 6 | import java.awt.*; 7 | import java.io.IOException; 8 | import java.net.MalformedURLException; 9 | import java.net.URISyntaxException; 10 | import java.net.URL; 11 | 12 | @Command.Declaration(name = "Releases", syntax = "releases", alias = {"releases", "release", "updateversion"}) 13 | public class ReleasesCommand extends Command { 14 | 15 | @Override 16 | public void onCommand(String command, String[] message) { 17 | 18 | try { 19 | URL url = new URL("https://github.com/IUDevman/gamesense-client/releases"); 20 | try { 21 | Desktop.getDesktop().browse(url.toURI()); 22 | MessageBus.sendCommandMessage("Opened a link to the releases page!", true); 23 | } catch (IOException | URISyntaxException e) { 24 | e.printStackTrace(); 25 | MessageBus.sendCommandMessage("Failed to open a link to the releases page!", true); 26 | } 27 | } catch (MalformedURLException e) { 28 | e.printStackTrace(); 29 | MessageBus.sendCommandMessage("Failed to open a link to the releases page!", true); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/SaveConfigCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.config.SaveConfig; 4 | import com.gamesense.api.util.misc.MessageBus; 5 | import com.gamesense.client.command.Command; 6 | 7 | /** 8 | * @author Hoosiers 9 | * @since 1/1/2020 10 | */ 11 | 12 | @Command.Declaration(name = "SaveConfig", syntax = "saveconfig", alias = {"saveconfig", "saveconfiguration"}) 13 | public class SaveConfigCommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | SaveConfig.init(); 17 | MessageBus.sendCommandMessage("Config saved!", true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/TeleportCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.client.command.Command; 4 | import net.minecraft.network.play.client.CPacketPlayer; 5 | 6 | @Command.Declaration(name = "Teleport", syntax = "tp [x] [y] [z]", alias = {"tp", "teleport", "clipto"}) 7 | public class TeleportCommand extends Command { 8 | @Override 9 | public void onCommand(String command, String[] message) { 10 | try { 11 | String x = message[0]; 12 | String y = message[1]; 13 | String z = message[2]; 14 | 15 | int xp = Integer.parseInt(x); 16 | int yp = Integer.parseInt(y); 17 | int zp = Integer.parseInt(z); 18 | 19 | if (mc.player.ridingEntity == null) 20 | mc.player.setPositionAndUpdate(xp,yp,zp); 21 | else 22 | mc.player.ridingEntity.setPosition(xp,yp,zp); 23 | 24 | mc.player.connection.sendPacket(new CPacketPlayer.Position(xp,yp,zp,false)); 25 | 26 | } catch (Exception ignored) {} 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/ToggleCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | 8 | /** 9 | * @Author Hoosiers on 11/05/2020 10 | */ 11 | 12 | @Command.Declaration(name = "Toggle", syntax = "toggle [module]", alias = {"toggle", "t", "enable", "disable"}) 13 | public class ToggleCommand extends Command { 14 | 15 | public void onCommand(String command, String[] message) { 16 | String main = message[0]; 17 | 18 | Module module = ModuleManager.getModule(main); 19 | 20 | if (module == null) { 21 | MessageBus.sendCommandMessage(this.getSyntax(), true); 22 | return; 23 | } 24 | 25 | module.toggle(); 26 | 27 | if (module.isEnabled()) { 28 | MessageBus.sendCommandMessage("Module " + module.getName() + " set to: ENABLED!", true); 29 | } else { 30 | MessageBus.sendCommandMessage("Module " + module.getName() + " set to: DISABLED!", true); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/VClipCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.command.Command; 5 | import com.gamesense.client.module.ModuleManager; 6 | import com.gamesense.client.module.modules.gui.ColorMain; 7 | 8 | @Command.Declaration(name = "VerticalClip", syntax = "VClip [Distance]", alias = {"vclip", "vc", "yclip", "yc"}) 9 | public class VClipCommand extends Command { 10 | 11 | double amount; 12 | 13 | @Override 14 | public void onCommand(String command, String[] message) { 15 | if (mc.player != null){ 16 | String main = message[0]; 17 | 18 | try { 19 | amount = Double.parseDouble(main); 20 | if (amount >= 0) 21 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getEnabledColor() + "Clipped the player " + amount + " blocks up", true); 22 | else 23 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getEnabledColor() + "Clipped the player " + -amount + " blocks down", true); 24 | 25 | } catch (NumberFormatException e) { 26 | MessageBus.sendCommandMessage(ModuleManager.getModule(ColorMain.class).getDisabledColor() + "You moron, you absolute buffoon, how do you mess up entering a number into a command, you philistine!", true); 27 | return; 28 | } 29 | mc.player.setPositionAndUpdate(mc.player.posX, mc.player.posY + amount, mc.player.posZ); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/command/commands/namesCommand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.command.commands; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.api.util.player.social.SocialManager; 5 | import com.gamesense.client.command.Command; 6 | 7 | /** 8 | * @Author Hoosiers on 11/05/2020 9 | */ 10 | 11 | @Command.Declaration(name = "Names", syntax = "names list/add/del [player]", alias = {"names", "name", "specialname"}) 12 | public class namesCommand extends Command { 13 | 14 | public void onCommand(String command, String[] message) { 15 | String main = message[0]; 16 | 17 | if (main.equalsIgnoreCase("list")) { 18 | MessageBus.sendClientPrefixMessage("Names: " + SocialManager.getSpecialNamesString() + "!"); 19 | return; 20 | } 21 | 22 | String value = message[1]; 23 | 24 | if (main.equalsIgnoreCase("add") && !SocialManager.isSpecial(value)) { 25 | SocialManager.addSpecialName(value); 26 | MessageBus.sendCommandMessage("Added name: " + value.toUpperCase() + "!", true); 27 | } else if (main.equalsIgnoreCase("del") && SocialManager.isSpecial(value)) { 28 | SocialManager.delSpecial(value); 29 | MessageBus.sendCommandMessage("Deleted name: " + value.toUpperCase() + "!", true); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/manager/Manager.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.manager; 2 | 3 | import me.zero.alpine.listener.Listenable; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.entity.EntityPlayerSP; 6 | import net.minecraft.client.multiplayer.WorldClient; 7 | import net.minecraft.profiler.Profiler; 8 | 9 | public interface Manager extends Listenable { 10 | 11 | default Minecraft getMinecraft() { 12 | return Minecraft.getMinecraft(); 13 | } 14 | 15 | default EntityPlayerSP getPlayer() { 16 | return getMinecraft().player; 17 | } 18 | 19 | default WorldClient getWorld() { 20 | return getMinecraft().world; 21 | } 22 | 23 | default Profiler getProfiler() { 24 | return getMinecraft().profiler; 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/manager/ManagerLoader.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.manager; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import com.gamesense.client.GameSense; 7 | import com.gamesense.client.manager.managers.ClientEventManager; 8 | import com.gamesense.client.manager.managers.PlayerPacketManager; 9 | import com.gamesense.client.manager.managers.TotemPopManager; 10 | 11 | import net.minecraftforge.common.MinecraftForge; 12 | 13 | public class ManagerLoader { 14 | 15 | private static final List managers = new ArrayList<>(); 16 | 17 | public static void init() { 18 | register(ClientEventManager.INSTANCE); 19 | register(PlayerPacketManager.INSTANCE); 20 | register(TotemPopManager.INSTANCE); 21 | } 22 | 23 | private static void register(Manager manager) { 24 | managers.add(manager); 25 | GameSense.EVENT_BUS.subscribe(manager); 26 | MinecraftForge.EVENT_BUS.register(manager); 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/Category.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module; 2 | 3 | public enum Category { 4 | Combat, 5 | Exploits, 6 | GUI, 7 | HUD, 8 | Misc, 9 | Movement, 10 | Render, 11 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/HUDModule.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module; 2 | 3 | import java.awt.Point; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | import com.gamesense.client.GameSense; 10 | import com.lukflug.panelstudio.component.IFixedComponent; 11 | import com.lukflug.panelstudio.theme.ITheme; 12 | 13 | /** 14 | * @author lukflug 15 | */ 16 | 17 | public abstract class HUDModule extends Module { 18 | 19 | @Retention(RetentionPolicy.RUNTIME) 20 | @Target(ElementType.TYPE) 21 | public @interface Declaration { 22 | int posX(); 23 | 24 | int posZ(); 25 | } 26 | 27 | private Declaration getDeclaration() { 28 | return getClass().getAnnotation(Declaration.class); 29 | } 30 | 31 | public static final int LIST_BORDER=1; 32 | protected IFixedComponent component; 33 | protected Point position = new Point(getDeclaration().posX(), getDeclaration().posZ()); 34 | 35 | public abstract void populate(ITheme theme); 36 | 37 | public IFixedComponent getComponent() { 38 | return component; 39 | } 40 | 41 | public void resetPosition() { 42 | component.setPosition(GameSense.INSTANCE.gameSenseGUI.guiInterface, position); 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/combat/AutoLog.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.combat; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.init.Items; 7 | import net.minecraft.item.ItemStack; 8 | 9 | @Module.Declaration(name = "AutoLog", category = Category.Combat) 10 | public class AutoLog extends Module { 11 | 12 | IntegerSetting tots = registerInteger("Totems", 1, 0, 36); 13 | IntegerSetting hp = registerInteger("Health", 12, 0, 36); 14 | 15 | @Override 16 | public void onUpdate() { 17 | if (mc.player.getHealth() + mc.player.getAbsorptionAmount() > hp.getValue() 18 | && mc.player.inventory.mainInventory.stream().filter(itemStack -> itemStack.getItem() == Items.TOTEM_OF_UNDYING).mapToInt(ItemStack::getCount).sum() < tots.getValue()) { 19 | mc.player.connection.getNetworkManager().handleDisconnection(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/combat/FastBow.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.combat; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import com.gamesense.client.module.ModuleManager; 7 | import net.minecraft.item.ItemBow; 8 | import net.minecraft.network.play.client.CPacketPlayerDigging; 9 | import net.minecraft.network.play.client.CPacketPlayerTryUseItem; 10 | import net.minecraft.util.math.BlockPos; 11 | 12 | @Module.Declaration(name = "FastBow", category = Category.Combat) 13 | public class FastBow extends Module { 14 | 15 | IntegerSetting drawLength = registerInteger("Draw Length", 3, 0, 21); 16 | 17 | public void onUpdate() { 18 | if (mc.player.getHeldItemMainhand().getItem() instanceof ItemBow && mc.player.isHandActive() && mc.player.getItemInUseMaxCount() >= drawLength.getValue() && !ModuleManager.isModuleEnabled("Quiver")) { 19 | mc.player.connection.sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, mc.player.getHorizontalFacing())); 20 | mc.player.connection.sendPacket(new CPacketPlayerTryUseItem(mc.player.getActiveHand())); 21 | mc.player.stopActiveHand(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/combat/Friends.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.combat; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.api.setting.values.BooleanSetting; 5 | import com.gamesense.api.util.player.social.SocialManager; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.entity.Entity; 11 | import net.minecraft.network.play.client.CPacketUseEntity; 12 | 13 | import java.util.Objects; 14 | 15 | @Module.Declaration(name = "Friends", category = Category.Combat, enabled = true, drawn = false) 16 | public class Friends extends Module { 17 | 18 | BooleanSetting antiHit = registerBoolean("AntiFriendHit", true); 19 | 20 | @EventHandler 21 | private final Listener listener = new Listener<>(event -> { 22 | 23 | if (antiHit.getValue()) { 24 | try { 25 | if (event.getPacket() instanceof CPacketUseEntity && ((CPacketUseEntity) event.getPacket()).getAction() == CPacketUseEntity.Action.ATTACK) { 26 | Entity e = Objects.requireNonNull(((CPacketUseEntity) event.getPacket()).getEntityFromWorld(mc.world)); 27 | 28 | if (SocialManager.isFriend(e.getName()) || e.getName().equals("Doogie13")) 29 | event.cancel(); 30 | } 31 | } catch (Exception ignored) { 32 | } 33 | } 34 | 35 | }); 36 | 37 | public static Friends INSTANCE; 38 | 39 | public Friends() { 40 | INSTANCE = this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/Drown.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.network.play.client.CPacketPlayer; 7 | 8 | @Module.Declaration(name = "Drown",category = Category.Exploits) 9 | public class Drown extends Module { 10 | 11 | IntegerSetting speed = registerInteger("Speed",20,1,100); 12 | 13 | @Override 14 | public void onUpdate() { 15 | 16 | for (int i = 0; i < speed.getValue(); i++) 17 | mc.player.connection.sendPacket(new CPacketPlayer(mc.player.onGround)); 18 | 19 | if (mc.player.isDead) 20 | disable(); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/HoosiersDupe.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | import net.minecraft.client.entity.EntityPlayerSP; 6 | import net.minecraft.client.multiplayer.WorldClient; 7 | import net.minecraft.entity.item.EntityItem; 8 | import net.minecraft.item.ItemStack; 9 | 10 | import java.util.Random; 11 | 12 | @Module.Declaration(name = "HoosiersDupe", category = Category.Exploits) 13 | public class HoosiersDupe extends Module { 14 | 15 | private final Random random = new Random(); 16 | 17 | public void onEnable() { 18 | EntityPlayerSP player = mc.player; 19 | WorldClient world = mc.world; 20 | 21 | if (player == null || mc.world == null) return; 22 | 23 | ItemStack itemStack = player.getHeldItemMainhand(); 24 | 25 | if (itemStack.isEmpty()) { 26 | setDisabledMessage("You need to hold an item in hand to dupe!"); 27 | disable(); 28 | return; 29 | } 30 | 31 | int count = random.nextInt(31) + 1; 32 | 33 | for (int i = 0; i <= count; i++) { 34 | EntityItem entityItem = player.dropItem(itemStack.copy(), false, true); 35 | if (entityItem != null) world.addEntityToWorld(entityItem.entityId, entityItem); 36 | } 37 | 38 | int total = count * itemStack.getCount(); 39 | player.sendChatMessage("I just used the Go_Hoosiers Dupe and got " + total + " " + itemStack.getDisplayName() + " thanks to GameSense!"); 40 | disable(); 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/LiquidInteract.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | 6 | @Module.Declaration(name = "LiquidInteract", category = Category.Exploits) 7 | public class LiquidInteract extends Module { 8 | 9 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/PingSpoof.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.api.setting.values.DoubleSetting; 5 | import com.gamesense.api.util.misc.Timer; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.network.play.client.CPacketKeepAlive; 11 | 12 | @Module.Declaration(name = "PingSpoof", category = Category.Exploits) 13 | public class PingSpoof extends Module { 14 | 15 | DoubleSetting ping = registerDouble("Ping", 100,1,1000); 16 | 17 | Timer timer = new Timer(); 18 | 19 | CPacketKeepAlive cPacketKeepAlive = null; 20 | 21 | public void onUpdate() { 22 | if(timer.hasReached(ping.getValue().longValue()) && cPacketKeepAlive != null) { 23 | mc.player.connection.sendPacket(cPacketKeepAlive); 24 | cPacketKeepAlive = null; 25 | } 26 | } 27 | 28 | @EventHandler 29 | private final Listener sendListener = new Listener<>(event -> { 30 | if(event.getPacket() instanceof CPacketKeepAlive && cPacketKeepAlive != event.getPacket() && ping.getValue() != 0) { 31 | cPacketKeepAlive = (CPacketKeepAlive) event.getPacket(); 32 | event.cancel(); 33 | timer.reset(); 34 | } 35 | }); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/PortalGodmode.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketConfirmTeleport; 9 | 10 | @Module.Declaration(name = "PortalGodmode", category = Category.Exploits) 11 | public class PortalGodmode extends Module { 12 | 13 | @SuppressWarnings("unused") 14 | @EventHandler 15 | private final Listener listener = new Listener<>(event -> { 16 | if (event.getPacket() instanceof CPacketConfirmTeleport) { 17 | event.cancel(); 18 | } 19 | }); 20 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/Reach.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.event.events.ReachDistanceEvent; 4 | import com.gamesense.api.setting.values.DoubleSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | 10 | /** 11 | * @author linustouchtips 12 | * @since 12/12/2020 13 | */ 14 | 15 | @Module.Declaration(name = "Reach", category = Category.Exploits) 16 | public class Reach extends Module { 17 | 18 | DoubleSetting distance = registerDouble("Distance", 6, 1, 10); 19 | 20 | @SuppressWarnings("unused") 21 | @EventHandler 22 | private final Listener eventListener = new Listener<>(event -> { 23 | event.setDistance(distance.getValue().floatValue()); 24 | }); 25 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/RoofInteract.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock; 9 | import net.minecraft.util.EnumFacing; 10 | 11 | /** 12 | * @author ToxicAven 13 | * @since 7/22/2021 14 | */ 15 | 16 | @Module.Declaration(name = "RoofInteract", category = Category.Exploits) 17 | public class RoofInteract extends Module { 18 | 19 | @SuppressWarnings("unused") 20 | @EventHandler 21 | private final Listener packetListener = new Listener<>(event -> { 22 | if (event.getPacket() instanceof CPacketPlayerTryUseItemOnBlock) { 23 | CPacketPlayerTryUseItemOnBlock packet = (CPacketPlayerTryUseItemOnBlock)event.getPacket(); 24 | if (packet.getPos().getY() >= 255 && packet.getDirection() == EnumFacing.UP) { 25 | mc.player.connection.sendPacket(new CPacketPlayerTryUseItemOnBlock(packet.getPos(), EnumFacing.DOWN, packet.getHand(), packet.getFacingX(), packet.getFacingY(), packet.getFacingZ())); 26 | event.cancel(); 27 | } 28 | } 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/exploits/SpeedNom.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.exploits; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.item.ItemFood; 7 | import net.minecraft.network.play.client.CPacketPlayer; 8 | import net.minecraft.network.play.client.CPacketPlayerDigging; 9 | import net.minecraft.util.EnumFacing; 10 | import net.minecraft.util.math.BlockPos; 11 | 12 | @Module.Declaration(name = "SpeedNom",category = Category.Exploits) 13 | public class SpeedNom extends Module { 14 | 15 | IntegerSetting nomSpeed = registerInteger("Nom Delay",16,1,20); 16 | IntegerSetting spoofs = registerInteger("Nom Speed",30,1,100); 17 | 18 | int ticks; 19 | 20 | @Override 21 | public void onUpdate() { 22 | if (mc.player.isHandActive() && mc.player.inventory.getCurrentItem().item instanceof ItemFood && ticks > nomSpeed.getValue()) { 23 | 24 | for (int i = 0; i < spoofs.getValue(); i++) { 25 | mc.player.connection.sendPacket(new CPacketPlayer(true)); 26 | } 27 | 28 | mc.player.connection.sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.DOWN)); 29 | mc.player.stopActiveHand(); 30 | 31 | ticks = 0; 32 | 33 | return; 34 | 35 | } 36 | ticks++; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/gui/HUDEditor.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.gui; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.GameSense; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import com.gamesense.client.module.ModuleManager; 8 | import com.gamesense.client.module.modules.misc.Announcer; 9 | import org.lwjgl.input.Keyboard; 10 | 11 | @Module.Declaration(name = "HudEditor", category = Category.GUI, bind = Keyboard.KEY_P, drawn = false) 12 | public class HUDEditor extends Module { 13 | 14 | public void onEnable() { 15 | GameSense.INSTANCE.gameSenseGUI.enterHUDEditor(); 16 | Announcer announcer = ModuleManager.getModule(Announcer.class); 17 | 18 | if (announcer.clickGui.getValue() && announcer.isEnabled() && mc.player != null) { 19 | if (announcer.clientSide.getValue()) { 20 | MessageBus.sendClientPrefixMessage(Announcer.guiMessage); 21 | } else { 22 | MessageBus.sendServerMessage(Announcer.guiMessage); 23 | } 24 | } 25 | disable(); 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/hud/ServerInfo.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.hud; 2 | 3 | import com.gamesense.client.clickgui.GameSenseGUI; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.HUDModule; 6 | import com.gamesense.client.module.Module; 7 | import com.lukflug.panelstudio.hud.HUDList; 8 | import com.lukflug.panelstudio.hud.ListComponent; 9 | import com.lukflug.panelstudio.setting.Labeled; 10 | import com.lukflug.panelstudio.theme.ITheme; 11 | 12 | import java.awt.*; 13 | 14 | @Module.Declaration(name = "ServerInfo", category = Category.HUD) 15 | @HUDModule.Declaration(posX = 0, posZ = 0) 16 | public class ServerInfo extends HUDModule { 17 | private final IPList list = new IPList(); 18 | 19 | @Override 20 | public void populate(ITheme theme) { 21 | component = new ListComponent(new Labeled(getName(),null,()->true), position, getName(), list, GameSenseGUI.FONT_HEIGHT, HUDModule.LIST_BORDER); 22 | } 23 | 24 | private static class IPList implements HUDList { 25 | 26 | @Override 27 | public int getSize() { 28 | return 1; 29 | } 30 | 31 | @Override 32 | public String getItem(int index) { 33 | try { 34 | return "IP: " + mc.serverName; 35 | } catch (Exception e) { 36 | return "IP: null"; 37 | } 38 | } 39 | 40 | @Override 41 | public Color getItemColor(int index) { 42 | return Color.WHITE; 43 | } 44 | 45 | @Override 46 | public boolean sortUp() { 47 | return true; 48 | } 49 | 50 | @Override 51 | public boolean sortRight() { 52 | return true; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/hud/Watermark.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.hud; 2 | 3 | import java.awt.Color; 4 | 5 | import com.gamesense.api.setting.values.ColorSetting; 6 | import com.gamesense.api.util.render.GSColor; 7 | import com.gamesense.client.GameSense; 8 | import com.gamesense.client.clickgui.GameSenseGUI; 9 | import com.gamesense.client.module.Category; 10 | import com.gamesense.client.module.HUDModule; 11 | import com.gamesense.client.module.Module; 12 | import com.lukflug.panelstudio.hud.HUDList; 13 | import com.lukflug.panelstudio.hud.ListComponent; 14 | import com.lukflug.panelstudio.setting.Labeled; 15 | import com.lukflug.panelstudio.theme.ITheme; 16 | 17 | @Module.Declaration(name = "Watermark", category = Category.HUD) 18 | @HUDModule.Declaration(posX = 0, posZ = 0) 19 | public class Watermark extends HUDModule { 20 | 21 | ColorSetting color = registerColor("Color", new GSColor(255, 0, 0, 255)); 22 | 23 | @Override 24 | public void populate(ITheme theme) { 25 | component = new ListComponent(new Labeled(getName(),null,()->true), position, getName(), new WatermarkList(), GameSenseGUI.FONT_HEIGHT, HUDModule.LIST_BORDER); 26 | } 27 | 28 | private class WatermarkList implements HUDList { 29 | 30 | @Override 31 | public int getSize() { 32 | return 1; 33 | } 34 | 35 | @Override 36 | public String getItem(int index) { 37 | return "gs++ " + GameSense.MODVER; 38 | } 39 | 40 | @Override 41 | public Color getItemColor(int index) { 42 | return color.getValue(); 43 | } 44 | 45 | @Override 46 | public boolean sortUp() { 47 | return false; 48 | } 49 | 50 | @Override 51 | public boolean sortRight() { 52 | return false; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/hud/Welcomer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.hud; 2 | 3 | import java.awt.Color; 4 | 5 | import com.gamesense.api.setting.values.ColorSetting; 6 | import com.gamesense.api.util.render.GSColor; 7 | import com.gamesense.client.clickgui.GameSenseGUI; 8 | import com.gamesense.client.module.Category; 9 | import com.gamesense.client.module.HUDModule; 10 | import com.gamesense.client.module.Module; 11 | import com.lukflug.panelstudio.hud.HUDList; 12 | import com.lukflug.panelstudio.hud.ListComponent; 13 | import com.lukflug.panelstudio.setting.Labeled; 14 | import com.lukflug.panelstudio.theme.ITheme; 15 | 16 | @Module.Declaration(name = "Welcomer", category = Category.HUD) 17 | @HUDModule.Declaration(posX = 450, posZ = 0) 18 | public class Welcomer extends HUDModule { 19 | 20 | ColorSetting color = registerColor("Color", new GSColor(255, 0, 0, 255)); 21 | 22 | @Override 23 | public void populate(ITheme theme) { 24 | component = new ListComponent(new Labeled(getName(),null,()->true), position, getName(), new WelcomerList(), GameSenseGUI.FONT_HEIGHT, HUDModule.LIST_BORDER); 25 | } 26 | 27 | private class WelcomerList implements HUDList { 28 | 29 | @Override 30 | public int getSize() { 31 | return 1; 32 | } 33 | 34 | @Override 35 | public String getItem(int index) { 36 | return "Hello " + mc.player.getName() + " :^)"; 37 | } 38 | 39 | @Override 40 | public Color getItemColor(int index) { 41 | return color.getValue(); 42 | } 43 | 44 | @Override 45 | public boolean sortUp() { 46 | return false; 47 | } 48 | 49 | @Override 50 | public boolean sortRight() { 51 | return false; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/AntiPing.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | 6 | @Module.Declaration(name = "AntiPing", category = Category.Misc, enabled = true) 7 | public class AntiPing extends Module { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/AutoMount.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.util.player.RotationUtil; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.entity.item.EntityBoat; 8 | import net.minecraft.entity.passive.*; 9 | import net.minecraft.network.play.client.CPacketPlayer; 10 | import net.minecraft.util.EnumHand; 11 | import net.minecraft.util.math.Vec2f; 12 | 13 | @Module.Declaration(name = "AutoMount", category = Category.Misc) 14 | public class AutoMount extends Module { 15 | 16 | @Override 17 | public void onUpdate() { 18 | if (mc.player.ridingEntity != null) 19 | return; 20 | 21 | for (Entity e : mc.world.loadedEntityList) { 22 | 23 | if (valid(e)) { 24 | 25 | Vec2f rot = RotationUtil.getRotationTo(e.getPositionVector()); 26 | mc.player.connection.sendPacket(new CPacketPlayer.Rotation(rot.x,rot.y,mc.player.onGround)); 27 | mc.playerController.interactWithEntity(mc.player,e, EnumHand.MAIN_HAND); 28 | 29 | } 30 | 31 | } 32 | 33 | } 34 | 35 | boolean valid(Entity entity) { 36 | 37 | return (entity instanceof EntityBoat 38 | || (entity instanceof EntityAnimal && ((EntityAnimal) entity).getGrowingAge() == 1 39 | && (entity instanceof EntityHorse 40 | || entity instanceof EntitySkeletonHorse 41 | || entity instanceof EntityDonkey 42 | || entity instanceof EntityMule 43 | || entity instanceof EntityPig && ((EntityPig) entity).getSaddled() 44 | || entity instanceof EntityLlama))); 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/AutoReply.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.util.misc.MessageBus; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 9 | 10 | @Module.Declaration(name = "AutoReply", category = Category.Misc) 11 | public class AutoReply extends Module { 12 | 13 | private static String reply = "I don't speak to newfags!"; 14 | 15 | @SuppressWarnings("unused") 16 | @EventHandler 17 | private final Listener listener = new Listener<>(event -> { 18 | if (event.getMessage().getUnformattedText().contains("whispers: ") && !event.getMessage().getUnformattedText().startsWith(mc.player.getName())) { 19 | if (event.getMessage().getUnformattedText().contains("I don't speak to newfags!")) { 20 | return; 21 | } 22 | 23 | MessageBus.sendServerMessage("/r " + reply); 24 | } 25 | }); 26 | 27 | public static String getReply() { 28 | return reply; 29 | } 30 | 31 | public static void setReply(String r) { 32 | reply = r; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/Credits.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.api.setting.values.BooleanSetting; 5 | import com.gamesense.api.setting.values.ModeSetting; 6 | import com.gamesense.client.GameSense; 7 | import com.gamesense.client.command.CommandManager; 8 | import com.gamesense.client.module.Category; 9 | import com.gamesense.client.module.Module; 10 | import com.gamesense.client.module.modules.combat.PistonCrystal; 11 | import me.zero.alpine.listener.EventHandler; 12 | import me.zero.alpine.listener.Listener; 13 | import net.minecraft.network.play.client.CPacketChatMessage; 14 | 15 | import java.util.Arrays; 16 | 17 | @Module.Declaration(name = "Credits", category = Category.Misc, enabled = true) 18 | public class Credits extends Module { 19 | 20 | 21 | @Override 22 | public void onUpdate() { 23 | if (mc.world == null && mc.player == null) 24 | return; 25 | 26 | PistonCrystal.printDebug(" think it's the duty of a developer to say if he took inspiration / took some piece of code from another client.\n" + 27 | "\n" + 28 | " How customchat is implemented for overriding minecraft's chat (https://www.curseforge.com/minecraft/mc-mods/better-chat)\n" + 29 | " BowExploit (https://github.com/PotatOoOoOo0/BowMcBomb)\n" + 30 | " Shaders (Momentum)\n" + 31 | " FootWalker (packet logged future and konas)\n" + 32 | " ChorusPost (k5)\n" + 33 | " Aspect (quantum)\n" + 34 | " fix log exploit (https://github.com/ChloePrime/fix4log4j)\n" + 35 | " AntiPing (Phobos)\n" + 36 | " NewChunks (Seppuku)\n" + 37 | " Trajectories (Phobos)\n" + 38 | " Chams (k5)\n" + 39 | " PacketLogger (w+3)\n", false); 40 | 41 | 42 | disable(); 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/ExtraTab.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | 7 | @Module.Declaration(name = "ExtraTab", category = Category.Misc) 8 | public class ExtraTab extends Module { 9 | public IntegerSetting players = registerInteger("Players", 255, 1, 500); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/FastPlace.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.init.Items; 7 | 8 | @Module.Declaration(name = "FastPlace", category = Category.Misc) 9 | public class FastPlace extends Module { 10 | 11 | BooleanSetting exp = registerBoolean("Exp", false); 12 | BooleanSetting crystals = registerBoolean("Crystals", false); 13 | BooleanSetting offhandCrystal = registerBoolean("Offhand Crystal", false); 14 | BooleanSetting everything = registerBoolean("Everything", false); 15 | 16 | public void onUpdate() { 17 | if (exp.getValue() && mc.player.getHeldItemMainhand().getItem() == Items.EXPERIENCE_BOTTLE || mc.player.getHeldItemOffhand().getItem() == Items.EXPERIENCE_BOTTLE) { 18 | mc.rightClickDelayTimer = 0; 19 | } 20 | 21 | if (crystals.getValue() && mc.player.getHeldItemMainhand().getItem() == Items.END_CRYSTAL) { 22 | mc.rightClickDelayTimer = 0; 23 | } 24 | 25 | if (offhandCrystal.getValue() && mc.player.getHeldItemOffhand().getItem() == Items.END_CRYSTAL) { 26 | mc.rightClickDelayTimer = 0; 27 | } 28 | 29 | if (everything.getValue()) { 30 | mc.rightClickDelayTimer = 0; 31 | } 32 | 33 | mc.playerController.blockHitDelay = 0; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/MultiTask.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | 6 | @Module.Declaration(name = "MultiTask", category = Category.Misc) 7 | public class MultiTask extends Module { 8 | 9 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/QueueNotifier.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.client.audio.PositionedSoundRecord; 9 | import net.minecraft.init.SoundEvents; 10 | import net.minecraft.util.text.ChatType; 11 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 12 | 13 | @Module.Declaration(name = "QueueNotifier", category = Category.Misc) 14 | public class QueueNotifier extends Module { 15 | BooleanSetting techale = registerBoolean("Techale mode", false); 16 | 17 | @EventHandler 18 | Listener listener = new Listener<>(event -> { 19 | String message = event.getMessage().getUnformattedText(); 20 | if (message.matches("Position in queue: ([1-5]\\b|[12]0)") && event.getType() == ChatType.SYSTEM) { 21 | if (techale.getValue()) { 22 | for (int i = 0; i < 29; i++) { 23 | playSound(); 24 | } 25 | } 26 | playSound(); 27 | } 28 | }); 29 | 30 | private void playSound() { 31 | mc.soundHandler.playSound(PositionedSoundRecord.getRecord(SoundEvents.ENTITY_PLAYER_LEVELUP, 1.0f, 1.0f)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/misc/XCarry.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.misc; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketCloseWindow; 9 | 10 | /** 11 | * @author Soulbond 12 | * @since 02/28/2021 13 | */ 14 | 15 | @Module.Declaration(name = "XCarry", category = Category.Misc) 16 | public class XCarry extends Module { 17 | 18 | @SuppressWarnings("unused") 19 | @EventHandler 20 | private final Listener listener = new Listener<>(event -> { 21 | if (event.getPacket() instanceof CPacketCloseWindow) { 22 | if (((CPacketCloseWindow) event.getPacket()).windowId == mc.player.inventoryContainer.windowId) { 23 | event.cancel(); 24 | } 25 | } 26 | }); 27 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/AirJump.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.IntegerSetting; 4 | import com.gamesense.api.setting.values.ModeSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | 8 | import java.util.Arrays; 9 | 10 | @Module.Declaration(name = "AirJump", category = Category.Movement) 11 | public class AirJump extends Module { 12 | 13 | ModeSetting mode = registerMode("Mode", Arrays.asList("Single", "Repeat"), "Single"); 14 | IntegerSetting repeat = registerInteger("Repeat", 19,1,20, () -> mode.getValue().equalsIgnoreCase("Repeat")); 15 | 16 | int timer; 17 | 18 | @Override 19 | public void onEnable() { 20 | timer = 0; 21 | } 22 | 23 | @Override 24 | public void onUpdate() { 25 | 26 | if(mc.player.onGround) 27 | timer = 0; 28 | else 29 | timer++; 30 | 31 | if (mode.getValue().equalsIgnoreCase("Single")){ 32 | if (mc.gameSettings.keyBindJump.isPressed()) { 33 | mc.player.jump(); 34 | } 35 | } else if (mode.getValue().equalsIgnoreCase("Repeat") && timer == repeat.getValue() && mc.gameSettings.keyBindJump.isKeyDown()) { 36 | 37 | mc.player.jump(); 38 | timer = 0; 39 | 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/AntiHunger.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.api.setting.values.BooleanSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.client.entity.EntityPlayerSP; 10 | import net.minecraft.network.Packet; 11 | import net.minecraft.network.play.client.CPacketEntityAction; 12 | import net.minecraft.network.play.client.CPacketEntityAction.Action; 13 | import net.minecraft.network.play.client.CPacketPlayer; 14 | 15 | //Pasted from Kami Blue, which pasted from Seppuku 16 | 17 | @Module.Declaration(name = "AntiHunger", category = Category.Movement) 18 | public class AntiHunger extends Module { 19 | 20 | BooleanSetting spoofMovement = registerBoolean("Spoof Movement", true); 21 | 22 | @SuppressWarnings("unused") 23 | @EventHandler 24 | private final Listener packetSendListener = new Listener<>(event -> { 25 | Packet packet = event.getPacket(); 26 | EntityPlayerSP player = mc.player; 27 | 28 | if (packet instanceof CPacketPlayer) { 29 | ((CPacketPlayer) packet).onGround = (player.fallDistance <= 0 || mc.playerController.isHittingBlock) && player.isElytraFlying(); 30 | } 31 | 32 | if (packet instanceof CPacketEntityAction 33 | && spoofMovement.getValue() 34 | && (((CPacketEntityAction) packet).getAction() == Action.START_SPRINTING 35 | || ((CPacketEntityAction) packet).getAction() == Action.STOP_SPRINTING)) { 36 | event.cancel(); 37 | } 38 | }); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/AutoJump.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | 6 | @Module.Declaration(name = "AutoJump", category = Category.Movement) 7 | public class AutoJump extends Module { 8 | 9 | public void onUpdate() { 10 | 11 | if (mc.player.onGround) { 12 | 13 | mc.player.jump(); 14 | 15 | } 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/AutoWalk.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | import net.minecraft.client.settings.KeyBinding; 6 | 7 | @Module.Declaration(name = "AutoWalk", category = Category.Movement) 8 | public class AutoWalk extends Module { 9 | 10 | @Override 11 | public void onUpdate() { 12 | KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), true); 13 | } 14 | 15 | @Override 16 | protected void onDisable() { 17 | KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), false); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/Avoid.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.event.events.BoundingBoxEvent; 4 | import com.gamesense.api.setting.values.BooleanSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.block.Block; 10 | import net.minecraft.init.Blocks; 11 | 12 | @Module.Declaration(name = "Avoid", category = Category.Movement) 13 | public class Avoid extends Module { 14 | 15 | public static Avoid INSTANCE; 16 | public Avoid() { 17 | INSTANCE = this; 18 | } 19 | 20 | public BooleanSetting unloaded = registerBoolean("Unloaded", false); 21 | public BooleanSetting cactus = registerBoolean("Cactus", false); 22 | public BooleanSetting fire = registerBoolean("Fire", false); 23 | public BooleanSetting bigFire = registerBoolean("Extend Fire", false, () -> fire.getValue()); 24 | 25 | @EventHandler 26 | private final Listener playerMoveEventListener = new Listener<>(event -> { 27 | 28 | if (event.getBlock().equals(Blocks.STRUCTURE_VOID) && unloaded.getValue() 29 | || event.getBlock().equals(Blocks.CACTUS) && cactus.getValue() 30 | || event.getBlock().equals(Blocks.FIRE) && fire.getValue()) 31 | 32 | if (bigFire.getValue() && event.getBlock() == Blocks.FIRE) 33 | event.setbb(Block.FULL_BLOCK_AABB.expand(0.1,0.1,0.1)); 34 | else 35 | event.setbb(Block.FULL_BLOCK_AABB); 36 | 37 | }); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/BoatFly.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.api.setting.values.DoubleSetting; 5 | import com.gamesense.api.util.world.MotionUtil; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import net.minecraft.entity.Entity; 9 | import net.minecraft.entity.item.EntityBoat; 10 | import net.minecraft.util.EnumHand; 11 | 12 | @Module.Declaration(name = "BoatFly", category = Category.Movement) 13 | public class BoatFly extends Module { 14 | 15 | DoubleSetting speed = registerDouble("Speed", 2, 0, 10); 16 | DoubleSetting ySpeed = registerDouble("Y Speed", 1, 0, 10); 17 | DoubleSetting glideSpeed = registerDouble("Glide Speed", 0, -10, 10); 18 | BooleanSetting hover = registerBoolean("Hover", false); 19 | BooleanSetting bypass = registerBoolean("Bypass", false); 20 | 21 | @Override 22 | public void onUpdate() { 23 | 24 | Entity e = mc.player.ridingEntity; 25 | 26 | if (e == null) 27 | return; 28 | 29 | if (mc.gameSettings.keyBindJump.isKeyDown()) 30 | e.motionY = ySpeed.getValue(); 31 | 32 | else if (mc.gameSettings.keyBindSneak.isKeyDown()) 33 | e.motionY = -ySpeed.getValue(); 34 | 35 | else 36 | e.motionY = hover.getValue() && mc.player.ticksExisted % 2 == 0 ? glideSpeed.getValue() : -glideSpeed.getValue(); 37 | 38 | 39 | if (MotionUtil.isMoving(mc.player)) { 40 | 41 | double[] dir = MotionUtil.forward(speed.getValue()); 42 | 43 | e.motionX = dir[0]; 44 | e.motionZ = dir[1]; 45 | 46 | } else { 47 | e.motionX = 0; 48 | e.motionZ = 0; 49 | } 50 | 51 | if (bypass.getValue() && mc.player.ticksExisted % 4 == 0) 52 | if (mc.player.ridingEntity instanceof EntityBoat) 53 | mc.playerController.interactWithEntity(mc.player, mc.player.ridingEntity, EnumHand.MAIN_HAND); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/BoundsMove.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.ModeSetting; 4 | import com.gamesense.api.util.player.PhaseUtil; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import com.gamesense.client.module.ModuleManager; 8 | 9 | @Module.Declaration(name = "BoundsMove", category = Category.Movement) 10 | public class BoundsMove extends Module { 11 | 12 | ModeSetting bound = registerMode("Bounds", PhaseUtil.bound, PhaseUtil.normal); 13 | 14 | @Override 15 | public void onUpdate() { 16 | if ((mc.player.moveForward != 0 || mc.player.moveStrafing != 0) 17 | && !(ModuleManager.getModule(Flight.class).isEnabled() 18 | && ModuleManager.getModule(Flight.class).mode.getValue().equalsIgnoreCase("Packet"))) { 19 | PhaseUtil.doBounds(bound.getValue(), true); 20 | } 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/EntityControl.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.event.events.ControlEvent; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import me.zero.alpine.event.type.Cancellable; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | 10 | /** 11 | * @source https://github.com/bebeli555/CookieClient/blob/main/src/main/java/me/bebeli555/cookieclient/mods/movement/EntityControl.java 12 | * */ 13 | 14 | @Module.Declaration(name = "EntityControl", category = Category.Movement) 15 | public class EntityControl extends Module { 16 | 17 | @EventHandler 18 | private final Listener packetSendListener = new Listener<>(Cancellable::cancel); 19 | 20 | @Override 21 | public void onUpdate() { 22 | if (mc.player.ridingEntity != null) { 23 | mc.player.ridingEntity.rotationYaw = mc.player.rotationYaw; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/EntitySpeed.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.api.util.world.MotionUtil; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | 8 | @Module.Declaration(name = "EntitySpeed", category = Category.Movement) 9 | public class EntitySpeed extends Module { 10 | 11 | DoubleSetting speed = registerDouble("Speed", 1,0,3.8); 12 | 13 | @Override 14 | public void onUpdate() { 15 | if (mc.player.ridingEntity != null) { 16 | 17 | double[] dir = MotionUtil.forward(speed.getValue()); 18 | mc.player.ridingEntity.motionX = dir[0]; 19 | mc.player.ridingEntity.motionZ = dir[1]; 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/FastFall.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.util.math.BlockPos; 7 | 8 | @Module.Declaration(name = "FastFall", category = Category.Movement) 9 | public class FastFall extends Module { 10 | 11 | DoubleSetting dist = registerDouble("Min Distance", 3,0,25); 12 | DoubleSetting speed = registerDouble("Multiplier", 3,0,10); 13 | 14 | @Override 15 | public void onUpdate() { 16 | if (mc.world.isAirBlock(new BlockPos(mc.player.getPositionVector()))) { 17 | if (mc.player.onGround && 18 | (!mc.player.isElytraFlying() 19 | || mc.player.fallDistance < dist.getValue() 20 | || !mc.player.capabilities.isFlying)) 21 | mc.player.motionY -= speed.getValue(); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/HighJump.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | 7 | @Module.Declaration(name = "HighJump", category = Category.Movement) 8 | public class HighJump extends Module { 9 | 10 | public DoubleSetting height = registerDouble("Height", 1, 0, 25); 11 | 12 | // Skidders, see MixinEntityPlayerSP 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/Jesus.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.event.events.BoundingBoxEvent; 4 | import com.gamesense.api.event.events.PlayerMoveEvent; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.block.Block; 10 | import net.minecraft.init.Blocks; 11 | import net.minecraft.util.math.BlockPos; 12 | 13 | @Module.Declaration(name = "Jesus", category = Category.Movement) 14 | public class Jesus extends Module { 15 | 16 | @EventHandler 17 | private final Listener boundingBoxEventListener = new Listener<>(event -> { 18 | 19 | if ((event.getBlock().equals(Blocks.WATER) || event.getBlock().equals(Blocks.LAVA)) && !mc.gameSettings.keyBindSneak.isKeyDown()) 20 | event.setbb(Block.FULL_BLOCK_AABB); 21 | 22 | }); 23 | 24 | @EventHandler 25 | private final Listener playerMoveEventListener = new Listener<>(event -> { 26 | 27 | if ((mc.world.getBlockState(new BlockPos(mc.player.getPositionVector())).getBlock().equals(Blocks.WATER) || mc.world.getBlockState(new BlockPos(mc.player.getPositionVector())).getBlock().equals(Blocks.LAVA)) && !mc.gameSettings.keyBindSneak.isKeyDown()) { 28 | 29 | mc.player.motionY = 0.1; 30 | 31 | } 32 | 33 | }); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/LevitationControl.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.init.MobEffects; 7 | import net.minecraft.potion.Potion; 8 | 9 | import java.util.Objects; 10 | 11 | @Module.Declaration(name = "LevitationControl",category = Category.Movement) 12 | public class LevitationControl extends Module { 13 | 14 | DoubleSetting upAmplifier = registerDouble("Amplifier Up",1,1,3); 15 | DoubleSetting downAmplifier = registerDouble("Amplifier Down",1,1,3); 16 | 17 | @Override 18 | public void onUpdate() { 19 | 20 | if (mc.player.isPotionActive(MobEffects.LEVITATION)) { 21 | 22 | int amplifier = Objects.requireNonNull(mc.player.getActivePotionEffect(Objects.requireNonNull(Potion.getPotionById(25)))).getAmplifier(); 23 | 24 | if (mc.gameSettings.keyBindJump.isKeyDown()) { 25 | mc.player.motionY = ((0.05D * (double)(amplifier + 1) - mc.player.motionY) * 0.2D) * upAmplifier.getValue(); // reverse the levitation effect if not holding space 26 | } else if (mc.gameSettings.keyBindSneak.isKeyDown()) { 27 | mc.player.motionY = -(((0.05D * (double)(amplifier + 1) - mc.player.motionY) * 0.2D) * downAmplifier.getValue()); 28 | } else { 29 | mc.player.motionY = 0; 30 | } 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/PassiveSpeed.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.api.util.player.PlayerUtil; 5 | import com.gamesense.api.util.world.MotionUtil; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import com.gamesense.client.module.ModuleManager; 9 | import net.minecraft.client.Minecraft; 10 | import net.minecraft.potion.Potion; 11 | 12 | @Module.Declaration(name = "PassiveSpeed", category = Category.Movement) 13 | public class PassiveSpeed extends Module { 14 | 15 | DoubleSetting speed = registerDouble("Speed", 1.1,1,2); 16 | 17 | @Override 18 | public void onUpdate() { 19 | if (!mc.player.onGround && MotionUtil.getMotion(mc.player) != 0 && !ModuleManager.isModuleEnabled(LongJump.class)) { 20 | 21 | mc.player.jumpMovementFactor = ((float) (0.02 * speed.getValue().floatValue())); 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/Pursue.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.ModeSetting; 4 | import com.gamesense.api.util.player.PlayerUtil; 5 | import com.gamesense.api.util.player.RotationUtil; 6 | import com.gamesense.api.util.world.MotionUtil; 7 | import com.gamesense.client.module.Category; 8 | import com.gamesense.client.module.Module; 9 | import net.minecraft.entity.Entity; 10 | 11 | import java.util.Arrays; 12 | 13 | @Module.Declaration(name = "Pursue", category = Category.Movement) 14 | public class Pursue extends Module { 15 | 16 | ModeSetting mode = registerMode("Mode", Arrays.asList("Closest", "Looking"), "Closest"); 17 | 18 | @Override 19 | public void onUpdate() { 20 | 21 | Entity target = null; 22 | 23 | if (mode.getValue().equalsIgnoreCase("Closest")) { 24 | target = PlayerUtil.findClosestTarget(6969, null, true); 25 | } else { 26 | target = PlayerUtil.findLookingPlayer(6969); 27 | } 28 | 29 | if (target != null) { 30 | if (mc.player.collidedHorizontally && mc.player.onGround) 31 | mc.player.jump(); 32 | 33 | float rot = RotationUtil.getRotationTo(target.getPositionVector()).x; 34 | 35 | double[] dir = MotionUtil.forward(Math.min(MotionUtil.getBaseMoveSpeed(), mc.player.getDistance(target)), rot); 36 | 37 | mc.player.setVelocity(dir[0], mc.player.motionY, dir[1]); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/SafeWalk.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.client.module.Category; 4 | import com.gamesense.client.module.Module; 5 | 6 | @Module.Declaration(name = "SafeWalk", category = Category.Movement) 7 | public class SafeWalk extends Module { 8 | 9 | /** 10 | * @see MixinEntity.java 11 | * */ 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/SlowFall.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.DoubleSetting; 4 | import com.gamesense.api.setting.values.ModeSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | 8 | import java.util.Arrays; 9 | 10 | @Module.Declaration(name = "SlowFall", category = Category.Movement) 11 | public class SlowFall extends Module { 12 | 13 | ModeSetting mode = registerMode("Mode", Arrays.asList("Timer", "Motion"), "Motion"); 14 | DoubleSetting timer = registerDouble("Timer", 0.1,0.1,1, () -> mode.getValue().equalsIgnoreCase("Timer")); 15 | DoubleSetting motion = registerDouble("Motion", 1, 0, 100); 16 | 17 | @Override 18 | public void onUpdate() { 19 | if (mc.gameSettings.keyBindJump.isKeyDown()) 20 | if (mode.getValue().equalsIgnoreCase("Timer")) 21 | mc.timer.tickLength = 50 / timer.getValue().floatValue(); 22 | else 23 | mc.player.motionY = motion.getValue() / 100; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/Sprint.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.client.entity.EntityPlayerSP; 7 | 8 | @Module.Declaration(name = "Sprint", category = Category.Movement) 9 | public class Sprint extends Module { 10 | 11 | BooleanSetting multiDirection = registerBoolean("Multi Direction", true); 12 | 13 | public void onUpdate() { 14 | EntityPlayerSP player = mc.player; 15 | 16 | if (player != null) { 17 | player.setSprinting(shouldSprint(player)); 18 | 19 | } 20 | } 21 | 22 | public boolean shouldSprint(EntityPlayerSP player) { 23 | return !mc.gameSettings.keyBindSneak.isKeyDown() 24 | && player.getFoodStats().getFoodLevel() > 6 25 | && !player.isElytraFlying() 26 | && !mc.player.capabilities.isFlying 27 | && checkMovementInput(player); 28 | } 29 | 30 | private boolean checkMovementInput(EntityPlayerSP player) { 31 | return multiDirection.getValue() ? (player.moveForward != 0.0f || player.moveStrafing != 0.0f) : player.moveForward > 0.0f; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/Timer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.api.setting.values.DoubleSetting; 5 | import com.gamesense.api.util.world.MotionUtil; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import com.gamesense.client.module.ModuleManager; 9 | import com.mojang.realmsclient.gui.ChatFormatting; 10 | import net.minecraft.client.Minecraft; 11 | 12 | @Module.Declaration(name = "Timer", category = Category.Movement) 13 | public class Timer extends Module { 14 | 15 | String arraylistSpeed; 16 | 17 | DoubleSetting speed = registerDouble("speed", 1.08, 0.1, 50); 18 | BooleanSetting onMove = registerBoolean("onMove",false); 19 | 20 | float speedDouble; 21 | 22 | public void onDisable() { 23 | Minecraft.getMinecraft().timer.tickLength = 50; 24 | } 25 | 26 | @Override 27 | public void onUpdate() { 28 | if ((!onMove.getValue() 29 | || MotionUtil.isMoving(mc.player) && onMove.getValue())) { 30 | doTimer(); 31 | } else { 32 | if (!(mc.player.onGround) && ModuleManager.getModule(PlayerTweaks.class).webT.getValue() && mc.player.isInWeb) 33 | mc.timer.tickLength = 1; 34 | else{ 35 | mc.timer.tickLength = 50; 36 | } 37 | } 38 | } 39 | 40 | public void doTimer() { 41 | speedDouble = speed.getValue().floatValue(); 42 | Minecraft.getMinecraft().timer.tickLength = 50.0f / speedDouble; 43 | } 44 | public String getHudInfo() { 45 | arraylistSpeed = ""; 46 | 47 | arraylistSpeed = "[" + ChatFormatting.WHITE + (Math.round(50 / mc.timer.tickLength * 100.0) / 100.0) + ChatFormatting.GRAY + "]"; 48 | 49 | return arraylistSpeed; 50 | } 51 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/ViewLock.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.util.misc.Timer; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | 7 | import java.util.Objects; 8 | 9 | @Module.Declaration(name = "ViewLock", category = Category.Movement) 10 | public class ViewLock extends Module { 11 | 12 | boolean dontChange; 13 | 14 | Timer timer = new Timer(); 15 | 16 | @Override 17 | public void onUpdate() { 18 | final int angle = 360 / 8; 19 | float yaw = mc.player.rotationYaw; 20 | 21 | if (org.lwjgl.input.Keyboard.isKeyDown(205) && !dontChange) { 22 | 23 | timer.reset(); 24 | dontChange = true; 25 | yaw += 45; 26 | 27 | } else if (org.lwjgl.input.Keyboard.isKeyDown(203) && !dontChange) { 28 | 29 | timer.reset(); 30 | dontChange = true; 31 | yaw -= 45; 32 | 33 | } 34 | 35 | if (dontChange) { 36 | 37 | if (timer.hasReached(250)) { 38 | 39 | dontChange = false; 40 | 41 | } 42 | 43 | } 44 | 45 | yaw = (float)(Math.round(yaw / angle) * angle); 46 | mc.player.rotationYaw = yaw; 47 | if (mc.player.isRiding()) { 48 | Objects.requireNonNull(mc.player.getRidingEntity()).rotationYaw = yaw; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/movement/WallClimb.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.movement; 2 | 3 | import com.gamesense.api.event.events.PlayerMoveEvent; 4 | import com.gamesense.api.setting.values.DoubleSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | 10 | @Module.Declaration(name = "WallClimb", category = Category.Movement) 11 | public class WallClimb extends Module { 12 | 13 | DoubleSetting speed = registerDouble("Speed", 0.42, 0, 1); 14 | 15 | @EventHandler 16 | private final Listener playerMoveEventListener = new Listener<>(event -> { 17 | 18 | if (mc.player.collidedHorizontally && (mc.player.movementInput.moveForward != 0 || mc.player.movementInput.moveStrafe != 0)) { 19 | event.setY(speed.getValue()); 20 | mc.player.fallDistance = 0; 21 | } 22 | 23 | }); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/Ambience.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.ColorSetting; 4 | import com.gamesense.api.util.render.GSColor; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | 8 | @Module.Declaration(name = "Ambience", category = Category.Render) 9 | public class Ambience extends Module { 10 | 11 | public ColorSetting colorLight = registerColor("Color Light", new GSColor(255, 255, 255)); 12 | 13 | 14 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/Aspect.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.event.events.AspectEvent; 4 | import com.gamesense.api.setting.values.BooleanSetting; 5 | import com.gamesense.api.setting.values.DoubleSetting; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import com.gamesense.client.module.modules.combat.PistonCrystal; 9 | import me.zero.alpine.listener.EventHandler; 10 | import me.zero.alpine.listener.Listener; 11 | 12 | @Module.Declaration(name = "Aspect", category = Category.Render) 13 | public class Aspect extends Module { 14 | 15 | DoubleSetting aspect = registerDouble("Aspect", 1, 0, 10); 16 | BooleanSetting credits = registerBoolean("Credits", false); 17 | 18 | @Override 19 | protected void onEnable() { 20 | if (credits.getValue()) 21 | PistonCrystal.printDebug("Aspect module imported from quantum-0.4.6", false); 22 | } 23 | 24 | @SuppressWarnings("unused") 25 | @EventHandler 26 | private final Listener aspectListener = new Listener<>(event -> event.setAspect(aspect.getValue().floatValue())); 27 | 28 | 29 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/CapesModule.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.ModeSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | 7 | import java.util.Arrays; 8 | 9 | @Module.Declaration(name = "Capes", category = Category.Render, drawn = false) 10 | public class CapesModule extends Module { 11 | 12 | public ModeSetting capeMode = registerMode("Type", Arrays.asList("Old", "New", "Amber"), "New"); 13 | 14 | public static String getUsName() { 15 | return mc.player.getName(); 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/ClientTime.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.event.events.PacketEvent; 4 | import com.gamesense.api.setting.values.IntegerSetting; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.network.play.server.SPacketTimeUpdate; 10 | 11 | @Module.Declaration(name = "ClientTime", category = Category.Render) 12 | public class ClientTime extends Module{ 13 | 14 | IntegerSetting time = registerInteger("Time", 1000,0, 23000); 15 | 16 | @Override 17 | public void onUpdate() { 18 | mc.world.setWorldTime(time.getValue()); 19 | } 20 | 21 | @EventHandler 22 | private final Listener noTimeUpdates = new Listener<>(event -> { 23 | 24 | if (event.getPacket() instanceof SPacketTimeUpdate) { 25 | 26 | event.cancel(); 27 | 28 | } 29 | 30 | }); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/Fullbright.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.ModeSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | import net.minecraft.potion.Potion; 7 | import net.minecraft.potion.PotionEffect; 8 | 9 | import java.util.Arrays; 10 | 11 | @Module.Declaration(name = "Fullbright", category = Category.Render) 12 | public class Fullbright extends Module { 13 | 14 | ModeSetting mode = registerMode("Mode", Arrays.asList("Gamma", "Potion"), "Gamma"); 15 | 16 | float oldGamma; 17 | 18 | public void onEnable() { 19 | oldGamma = mc.gameSettings.gammaSetting; 20 | } 21 | 22 | public void onUpdate() { 23 | if (mode.getValue().equalsIgnoreCase("Gamma")) { 24 | mc.gameSettings.gammaSetting = 666f; 25 | mc.player.removePotionEffect(Potion.getPotionById(16)); 26 | } else if (mode.getValue().equalsIgnoreCase("Potion")) { 27 | final PotionEffect potionEffect = new PotionEffect(Potion.getPotionById(16), 123456789, 5); 28 | potionEffect.setPotionDurationMax(true); 29 | mc.player.addPotionEffect(potionEffect); 30 | } 31 | } 32 | 33 | public void onDisable() { 34 | mc.gameSettings.gammaSetting = oldGamma; 35 | mc.player.removePotionEffect(Potion.getPotionById(16)); 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/MobOwner.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.util.render.GSColor; 4 | import com.gamesense.api.util.render.RenderUtil; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.entity.IEntityOwnable; 9 | import net.minecraft.entity.passive.AbstractHorse; 10 | 11 | import java.awt.*; 12 | import java.util.Objects; 13 | 14 | @Module.Declaration(name = "MobOwner", category = Category.Render) 15 | public class MobOwner extends Module { 16 | 17 | @Override 18 | public void onUpdate() { 19 | for (Entity e : mc.world.loadedEntityList) { 20 | if (e instanceof IEntityOwnable) { 21 | if (!(e instanceof AbstractHorse)){ 22 | try { 23 | RenderUtil.drawNametag(e, new String[]{Objects.requireNonNull(((IEntityOwnable) e).getOwner()).getName() + ""}, new GSColor(Color.WHITE), 0); 24 | } catch (NullPointerException ignored) {} 25 | 26 | } else { 27 | 28 | String string = "Name: " + 29 | e.getCustomNameTag() + 30 | ", Owner: " + 31 | ((Objects.requireNonNull(((IEntityOwnable) e).getOwner())).getName()) + 32 | ", Speed: " + 33 | ((AbstractHorse) e).getAIMoveSpeed(); 34 | RenderUtil.drawNametag(e, new String[]{string}, new GSColor(Color.WHITE), 1); 35 | 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/RainbowEnchant.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.ColorSetting; 4 | import com.gamesense.api.util.render.GSColor; 5 | import com.gamesense.client.module.Category; 6 | import com.gamesense.client.module.Module; 7 | 8 | 9 | @Module.Declaration(name = "RainbowEnchant", category = Category.Render) 10 | public class RainbowEnchant extends Module { 11 | public ColorSetting color = registerColor("Color", new GSColor(255, 16, 19, 100)); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/SkyColor.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.api.setting.values.ColorSetting; 5 | import com.gamesense.api.util.render.GSColor; 6 | import com.gamesense.client.module.Category; 7 | import com.gamesense.client.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraftforge.client.event.EntityViewRenderEvent; 11 | 12 | @Module.Declaration(name = "SkyColor", category = Category.Render) 13 | public class SkyColor extends Module { 14 | 15 | BooleanSetting fog = registerBoolean("Fog", true); 16 | ColorSetting color = registerColor("Color", new GSColor(0, 255, 0, 255)); 17 | 18 | @SuppressWarnings("unused") 19 | @EventHandler 20 | private final Listener fogColorsListener = new Listener<>(event -> { 21 | event.setRed(color.getValue().getRed() / 255.0F); 22 | event.setGreen(color.getValue().getGreen() / 255.0F); 23 | event.setBlue(color.getValue().getBlue() / 255.0F); 24 | }); 25 | 26 | @SuppressWarnings("unused") 27 | @EventHandler 28 | private final Listener fogDensityListener = new Listener<>(event -> { 29 | if (!fog.getValue()) { 30 | event.setDensity(0); 31 | event.setCanceled(true); 32 | } 33 | }); 34 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/client/module/modules/render/noGlitchBlock.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.client.module.modules.render; 2 | 3 | import com.gamesense.api.setting.values.BooleanSetting; 4 | import com.gamesense.client.module.Category; 5 | import com.gamesense.client.module.Module; 6 | 7 | @Module.Declaration(name = "NoGlitchBlock", category = Category.Render) 8 | public class noGlitchBlock extends Module { 9 | 10 | public BooleanSetting breakBlock = registerBoolean("Break", true); 11 | public BooleanSetting placeBlock = registerBoolean("Place", true); 12 | 13 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/GameSenseMixinLoader.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin; 2 | 3 | import com.gamesense.client.GameSense; 4 | import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; 5 | import org.spongepowered.asm.launch.MixinBootstrap; 6 | import org.spongepowered.asm.mixin.MixinEnvironment; 7 | import org.spongepowered.asm.mixin.Mixins; 8 | 9 | import javax.annotation.Nullable; 10 | import java.util.Map; 11 | 12 | @IFMLLoadingPlugin.Name(GameSense.MODNAME) 13 | @IFMLLoadingPlugin.MCVersion("1.12.2") 14 | public class GameSenseMixinLoader implements IFMLLoadingPlugin { 15 | 16 | private static boolean isObfuscatedEnvironment = false; 17 | 18 | public GameSenseMixinLoader() { 19 | GameSense.LOGGER.info("Mixins initialized"); 20 | MixinBootstrap.init(); 21 | Mixins.addConfiguration("mixins.gamesense.json"); 22 | MixinEnvironment.getDefaultEnvironment().setObfuscationContext("searge"); 23 | GameSense.LOGGER.info(MixinEnvironment.getDefaultEnvironment().getObfuscationContext()); 24 | } 25 | 26 | @Override 27 | public String[] getASMTransformerClass() { 28 | return new String[0]; 29 | } 30 | 31 | @Override 32 | public String getModContainerClass() { 33 | return null; 34 | } 35 | 36 | @Nullable 37 | @Override 38 | public String getSetupClass() { 39 | return null; 40 | } 41 | 42 | @Override 43 | public void injectData(Map data) { 44 | isObfuscatedEnvironment = (boolean) data.get("runtimeDeobfuscationEnabled"); 45 | } 46 | 47 | @Override 48 | public String getAccessTransformerClass() { 49 | return null; 50 | } 51 | 52 | 53 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinAbstractHorse.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.ControlEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.entity.passive.AbstractHorse; 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(AbstractHorse.class) 12 | public class MixinAbstractHorse { 13 | 14 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 15 | public void canBeSteered(CallbackInfoReturnable cir) { 16 | ControlEvent event = new ControlEvent(); 17 | GameSense.EVENT_BUS.post(event); 18 | 19 | if (event.isCancelled()) { 20 | cir.cancel(); 21 | cir.setReturnValue(true); 22 | } 23 | } 24 | 25 | @Inject(method = "isHorseSaddled", at = @At("HEAD"), cancellable = true) 26 | public void getSaddled(CallbackInfoReturnable cir) { 27 | ControlEvent event = new ControlEvent(); 28 | GameSense.EVENT_BUS.post(event); 29 | 30 | if (event.isCancelled()) { 31 | cir.cancel(); 32 | cir.setReturnValue(true); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinBlockLiquid.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.exploits.LiquidInteract; 5 | import net.minecraft.block.BlockLiquid; 6 | import net.minecraft.block.state.IBlockState; 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(BlockLiquid.class) 13 | public class MixinBlockLiquid { 14 | 15 | @Inject(method = "canCollideCheck", at = @At("HEAD"), cancellable = true) 16 | public void canCollideCheck(final IBlockState blockState, final boolean b, final CallbackInfoReturnable callbackInfoReturnable) { 17 | callbackInfoReturnable.setReturnValue(ModuleManager.isModuleEnabled(LiquidInteract.class) || (b && blockState.getValue(BlockLiquid.LEVEL) == 0)); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinBlockSoulSand.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.movement.PlayerTweaks; 5 | import net.minecraft.block.BlockSoulSand; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.world.World; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | @Mixin(BlockSoulSand.class) 16 | public class MixinBlockSoulSand { 17 | 18 | @Inject(method = "onEntityCollision", at = @At("HEAD"), cancellable = true) 19 | public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn, CallbackInfo callbackInfo) { 20 | PlayerTweaks playerTweaks = ModuleManager.getModule(PlayerTweaks.class); 21 | 22 | if (playerTweaks.isEnabled() && playerTweaks.noSlow.getValue()) { 23 | callbackInfo.cancel(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinChorus.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.ChorusEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.item.ItemChorusFruit; 7 | import net.minecraft.item.ItemFood; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.world.World; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | @Mixin(ItemChorusFruit.class) 16 | public class MixinChorus extends ItemFood { 17 | 18 | public MixinChorus(final int amount, final float saturation) { 19 | super(amount, saturation, false); 20 | } 21 | 22 | @Inject(method = "onItemUseFinish", at = @At(value = "HEAD")) 23 | public void attemptTeleportHook(ItemStack stack, World worldIn, EntityLivingBase entityLiving, CallbackInfoReturnable cir) { 24 | final ChorusEvent event = new ChorusEvent(); 25 | GameSense.EVENT_BUS.post(event); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinElytraSound.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.movement.ElytraFly; 5 | import net.minecraft.client.audio.ElytraSound; 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 | @Mixin(ElytraSound.class) 12 | public class MixinElytraSound { 13 | 14 | @Inject(method = "update", at = @At("HEAD"), cancellable = true) 15 | public void update(CallbackInfo ci) { 16 | if (ModuleManager.getModule(ElytraFly.class).isEnabled() && !ModuleManager.getModule(ElytraFly.class).sound.getValue()) { 17 | ci.cancel(); 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinEntityBoat.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.BoatMoveEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.entity.MoverType; 6 | import net.minecraft.entity.item.EntityBoat; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | @Mixin(EntityBoat.class) 12 | public abstract class MixinEntityBoat { 13 | 14 | @Redirect(method = "onUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/item/EntityBoat;move(Lnet/minecraft/entity/MoverType;DDD)V")) // credit to ares client 15 | public void onMove(EntityBoat entityBoat, MoverType type, double x, double y, double z) { 16 | BoatMoveEvent boatMoveEvent = new BoatMoveEvent(type, x, y, z); 17 | GameSense.EVENT_BUS.post(boatMoveEvent); 18 | if (!boatMoveEvent.isCancelled()) 19 | entityBoat.move(type, boatMoveEvent.getX(), boatMoveEvent.getY(), boatMoveEvent.getZ()); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinEntityLlama.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.ControlEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.entity.passive.EntityLlama; 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(EntityLlama.class) 12 | public class MixinEntityLlama { 13 | 14 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 15 | public void canBeSteered(CallbackInfoReturnable cir) { 16 | ControlEvent event = new ControlEvent(); 17 | GameSense.EVENT_BUS.post(event); 18 | 19 | if (event.isCancelled()) { 20 | cir.cancel(); 21 | cir.setReturnValue(true); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinEntityPig.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.ControlEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.entity.passive.EntityPig; 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(EntityPig.class) 12 | public class MixinEntityPig { 13 | 14 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 15 | public void canBeSteered(CallbackInfoReturnable cir) { 16 | ControlEvent event = new ControlEvent(); 17 | GameSense.EVENT_BUS.post(event); 18 | 19 | if (event.isCancelled()) { 20 | cir.cancel(); 21 | cir.setReturnValue(true); 22 | } 23 | } 24 | 25 | @Inject(method = "getSaddled", at = @At("HEAD"), cancellable = true) 26 | public void getSaddled(CallbackInfoReturnable cir) { 27 | ControlEvent event = new ControlEvent(); 28 | GameSense.EVENT_BUS.post(event); 29 | 30 | if (event.isCancelled()) { 31 | cir.cancel(); 32 | cir.setReturnValue(true); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinEntityPlayer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.PlayerJumpEvent; 4 | import com.gamesense.api.event.events.WaterPushEvent; 5 | import com.gamesense.client.GameSense; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.entity.player.EntityPlayer; 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(EntityPlayer.class) 16 | public abstract class MixinEntityPlayer { 17 | 18 | @Shadow 19 | public abstract String getName(); 20 | 21 | @Inject(method = "jump", at = @At("HEAD"), cancellable = true) 22 | public void onJump(CallbackInfo callbackInfo) { 23 | if (Minecraft.getMinecraft().player.getName() == this.getName()) { 24 | PlayerJumpEvent event = new PlayerJumpEvent(); 25 | GameSense.EVENT_BUS.post(event); 26 | if (event.isCancelled()) { 27 | callbackInfo.cancel(); 28 | } 29 | } 30 | } 31 | 32 | @Inject(method = "isPushedByWater", at = @At("HEAD"), cancellable = true) 33 | private void onPushedByWater(CallbackInfoReturnable callbackInfoReturnable) { 34 | WaterPushEvent event = new WaterPushEvent(); 35 | GameSense.EVENT_BUS.post(event); 36 | if (event.isCancelled()) { 37 | callbackInfoReturnable.setReturnValue(false); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinFontRenderer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.util.font.FontUtil; 4 | import com.gamesense.api.util.render.GSColor; 5 | import com.gamesense.client.module.ModuleManager; 6 | import com.gamesense.client.module.modules.gui.ColorMain; 7 | import net.minecraft.client.gui.FontRenderer; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | /** 13 | * @author Hoosiers 12/07/2020 14 | */ 15 | 16 | @Mixin(FontRenderer.class) 17 | public class MixinFontRenderer { 18 | 19 | @Redirect(method = "drawStringWithShadow", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawString(Ljava/lang/String;FFIZ)I")) 20 | public int drawCustomFontStringWithShadow(FontRenderer fontRenderer, String text, float x, float y, int color, boolean dropShadow) { 21 | ColorMain colorMain = ModuleManager.getModule(ColorMain.class); 22 | return colorMain.textFont.getValue() ? (int) FontUtil.drawStringWithShadow(true, text, (int) x, (int) y, new GSColor(color)) : fontRenderer.drawString(text, x, y, color, true); 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinGetCollisionBB.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.BoundingBoxEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.block.Block; 6 | import net.minecraft.block.BlockAir; 7 | import net.minecraft.block.BlockCactus; 8 | import net.minecraft.block.BlockFire; 9 | import net.minecraft.block.state.IBlockState; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.math.AxisAlignedBB; 12 | import net.minecraft.util.math.BlockPos; 13 | import net.minecraft.util.math.Vec3d; 14 | import net.minecraft.world.IBlockAccess; 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.injection.At; 17 | import org.spongepowered.asm.mixin.injection.Inject; 18 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 19 | 20 | /** 21 | * @author ToxicAven 22 | * */ 23 | 24 | // from lambda client 25 | 26 | @Mixin(Block.class) 27 | public class MixinGetCollisionBB { 28 | 29 | Minecraft mc = Minecraft.getMinecraft(); 30 | 31 | @Inject(method = "getCollisionBoundingBox", at = @At("HEAD"), cancellable = true) 32 | private void getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos, CallbackInfoReturnable cir) { 33 | 34 | BoundingBoxEvent event = new BoundingBoxEvent(blockState.getBlock(), new Vec3d(pos)); 35 | GameSense.EVENT_BUS.post(event); 36 | 37 | if (event.changed) { 38 | cir.cancel(); 39 | cir.setReturnValue(event.getbb()); 40 | } 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinGuiBossOverlay.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.BossbarEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.client.gui.GuiBossOverlay; 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 | @Mixin(GuiBossOverlay.class) 12 | public class MixinGuiBossOverlay { 13 | 14 | @Inject(method = "renderBossHealth", at = @At("HEAD"), cancellable = true) 15 | private void renderBossHealth(CallbackInfo callbackInfo) { 16 | BossbarEvent event = new BossbarEvent(); 17 | GameSense.EVENT_BUS.post(event); 18 | if (event.isCancelled()) { 19 | callbackInfo.cancel(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinGuiScreen.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.render.ShulkerViewer; 5 | import net.minecraft.client.gui.GuiScreen; 6 | import net.minecraft.item.ItemShulkerBox; 7 | import net.minecraft.item.ItemStack; 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(GuiScreen.class) 14 | public class MixinGuiScreen { 15 | 16 | @Inject(method = "renderToolTip", at = @At("HEAD"), cancellable = true) 17 | public void renderToolTip(ItemStack stack, int x, int y, CallbackInfo callbackInfo) { 18 | ShulkerViewer shulkerViewer = ModuleManager.getModule(ShulkerViewer.class); 19 | 20 | if (shulkerViewer.isEnabled() && stack.getItem() instanceof ItemShulkerBox) { 21 | if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("BlockEntityTag", 10)) { 22 | if (stack.getTagCompound().getCompoundTag("BlockEntityTag").hasKey("Items", 9)) { 23 | callbackInfo.cancel(); 24 | shulkerViewer.renderShulkerPreview(stack, x + 6, y - 33, 162, 66); 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinLayerArmorBase.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.render.RainbowEnchant; 5 | import net.minecraft.client.renderer.GlStateManager; 6 | import net.minecraft.client.renderer.entity.layers.LayerArmorBase; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | @Mixin(LayerArmorBase.class) 12 | public abstract class MixinLayerArmorBase { 13 | @Redirect(method = { "renderEnchantedGlint" }, at = @At(value = "INVOKE", target = "net/minecraft/client/renderer/GlStateManager.color(FFFF)V")) 14 | private static void renderEnchantedGlint(float a2, float a3, float a4, float v1) { 15 | RainbowEnchant rainbowEnchant = ModuleManager.getModule(RainbowEnchant.class); 16 | if (rainbowEnchant.isEnabled()) { 17 | a2 = rainbowEnchant.color.getValue().getRed() /255f; 18 | a4 = rainbowEnchant.color.getValue().getGreen() / 255f; 19 | a3 = rainbowEnchant.color.getValue().getBlue() / 255f; 20 | v1 = rainbowEnchant.color.getValue().getAlpha() / 255f; 21 | } 22 | GlStateManager.color(a2, a4, a3, v1); 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinLayerBipedArmor.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.render.NoRender; 5 | import net.minecraft.client.model.ModelBiped; 6 | import net.minecraft.client.renderer.entity.layers.LayerBipedArmor; 7 | import net.minecraft.inventory.EntityEquipmentSlot; 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(LayerBipedArmor.class) 14 | public class MixinLayerBipedArmor { 15 | 16 | @Inject(method = "setModelSlotVisible", at = @At(value = "HEAD"), cancellable = true) 17 | protected void setModelSlotVisible(ModelBiped model, EntityEquipmentSlot slotIn, CallbackInfo callbackInfo) { 18 | NoRender noRender = ModuleManager.getModule(NoRender.class); 19 | 20 | if (noRender.isEnabled() && noRender.armor.getValue()) { 21 | callbackInfo.cancel(); 22 | switch (slotIn) { 23 | case HEAD: { 24 | model.bipedHead.showModel = false; 25 | model.bipedHeadwear.showModel = false; 26 | } 27 | case CHEST: { 28 | model.bipedBody.showModel = false; 29 | model.bipedRightArm.showModel = false; 30 | model.bipedLeftArm.showModel = false; 31 | } 32 | case LEGS: { 33 | model.bipedBody.showModel = false; 34 | model.bipedRightLeg.showModel = false; 35 | model.bipedLeftLeg.showModel = false; 36 | } 37 | case FEET: { 38 | model.bipedRightLeg.showModel = false; 39 | model.bipedLeftLeg.showModel = false; 40 | } 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinLayerHeldItem.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.RenderEntityEvent; 4 | import com.gamesense.client.GameSense; 5 | import com.gamesense.client.module.ModuleManager; 6 | import com.gamesense.client.module.modules.render.NoRender; 7 | import com.gamesense.client.module.modules.render.Shaders; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.renderer.GlStateManager; 10 | import net.minecraft.client.renderer.entity.Render; 11 | import net.minecraft.client.renderer.entity.RenderLivingBase; 12 | import net.minecraft.client.renderer.entity.layers.LayerHeldItem; 13 | import net.minecraft.entity.EntityLivingBase; 14 | import net.minecraft.entity.player.EntityPlayer; 15 | import net.minecraft.entity.player.EnumPlayerModelParts; 16 | import net.minecraft.util.text.TextFormatting; 17 | import org.spongepowered.asm.mixin.Mixin; 18 | import org.spongepowered.asm.mixin.injection.At; 19 | import org.spongepowered.asm.mixin.injection.Inject; 20 | import org.spongepowered.asm.mixin.injection.Redirect; 21 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 22 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 23 | 24 | 25 | @Mixin(LayerHeldItem.class) 26 | public abstract class MixinLayerHeldItem { 27 | /* 28 | Shaders t = null; 29 | @Inject(method = "doRenderLayer", at = @At("HEAD"), cancellable = true) 30 | public void a(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale, CallbackInfo ci) { 31 | if (t == null) { 32 | t = ModuleManager.getModule(Shaders.class); 33 | return; 34 | } 35 | if (!t.renderCape) 36 | ci.cancel(); 37 | }*/ 38 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinMovementInputFromOptions.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.movement.PlayerTweaks; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.gui.GuiChat; 7 | import net.minecraft.client.settings.KeyBinding; 8 | import net.minecraft.util.MovementInput; 9 | import net.minecraft.util.MovementInputFromOptions; 10 | import org.lwjgl.input.Keyboard; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Redirect; 14 | 15 | @Mixin(value = MovementInputFromOptions.class, priority = 10000) 16 | public abstract class MixinMovementInputFromOptions extends MovementInput { 17 | 18 | @Redirect(method = "updatePlayerMoveState", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/settings/KeyBinding;isKeyDown()Z")) 19 | public boolean isKeyPressed(KeyBinding keyBinding) { 20 | int keyCode = keyBinding.getKeyCode(); 21 | 22 | if (keyCode > 0 && keyCode < Keyboard.KEYBOARD_SIZE) { 23 | PlayerTweaks playerTweaks = ModuleManager.getModule(PlayerTweaks.class); 24 | 25 | if (playerTweaks.isEnabled() && playerTweaks.guiMove.getValue() 26 | && Minecraft.getMinecraft().currentScreen != null 27 | && !(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) { 28 | if (keyCode != Minecraft.getMinecraft().gameSettings.keyBindSneak.getKeyCode()) { 29 | return Keyboard.isKeyDown(keyCode); 30 | } 31 | } 32 | } 33 | 34 | return keyBinding.isKeyDown(); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinPlayerOverlay.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.render.NoRender; 5 | import net.minecraft.client.gui.GuiIngame; 6 | import net.minecraft.client.gui.ScaledResolution; 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(GuiIngame.class) 13 | public class MixinPlayerOverlay { 14 | 15 | @Inject(method = "renderPumpkinOverlay", at = @At("HEAD"), cancellable = true) 16 | protected void renderPumpkinOverlayHook(ScaledResolution scaledRes, CallbackInfo callbackInfo) { 17 | NoRender noRender = ModuleManager.getModule(NoRender.class); 18 | 19 | if (noRender.isEnabled() && noRender.noOverlay.getValue()) { 20 | callbackInfo.cancel(); 21 | } 22 | } 23 | 24 | @Inject(method = "renderPotionEffects", at = @At("HEAD"), cancellable = true) 25 | protected void renderPotionEffectsHook(ScaledResolution scaledRes, CallbackInfo callbackInfo) { 26 | NoRender noRender = ModuleManager.getModule(NoRender.class); 27 | 28 | if (noRender.isEnabled() && noRender.noOverlay.getValue()) { 29 | callbackInfo.cancel(); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinRender.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.ShaderColorEvent; 4 | import com.gamesense.client.GameSense; 5 | import net.minecraft.client.renderer.entity.Render; 6 | import net.minecraft.entity.Entity; 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 | @SuppressWarnings("unused") 13 | @Mixin(Render.class) 14 | public class MixinRender { 15 | 16 | @Inject(method = "getTeamColor", at = @At("HEAD"), cancellable = true) 17 | public void getTeamColor(T entity, CallbackInfoReturnable info) { 18 | final ShaderColorEvent shaderColorEvent = new ShaderColorEvent(entity); 19 | GameSense.EVENT_BUS.post(shaderColorEvent); 20 | 21 | if (shaderColorEvent.isCancelled()) { 22 | info.cancel(); 23 | info.setReturnValue(shaderColorEvent.getColor().getRGB()); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinRenderCrystal.java: -------------------------------------------------------------------------------- 1 | /* 2 | CheckLightFor from lambda (https://github.com/lambda-client/lambda/blob/master/src/main/java/com/lambda/client/mixin/client/world/MixinWorld.java) 3 | */ 4 | package com.gamesense.mixin.mixins; 5 | 6 | import com.gamesense.api.event.events.NewRenderEntityEvent; 7 | import com.gamesense.api.event.events.RenderEntityEvent; 8 | import com.gamesense.client.GameSense; 9 | import com.gamesense.client.module.ModuleManager; 10 | import com.gamesense.client.module.modules.render.NoRender; 11 | import com.gamesense.client.module.modules.render.noGlitchBlock; 12 | import net.minecraft.block.state.IBlockState; 13 | import net.minecraft.client.model.ModelBase; 14 | import net.minecraft.client.renderer.entity.RenderEnderCrystal; 15 | import net.minecraft.entity.Entity; 16 | import net.minecraft.util.math.BlockPos; 17 | import net.minecraft.world.EnumSkyBlock; 18 | import net.minecraft.world.World; 19 | import net.minecraftforge.common.MinecraftForge; 20 | import org.spongepowered.asm.mixin.Mixin; 21 | import org.spongepowered.asm.mixin.injection.At; 22 | import org.spongepowered.asm.mixin.injection.Inject; 23 | import org.spongepowered.asm.mixin.injection.Redirect; 24 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 25 | 26 | @Mixin(RenderEnderCrystal.class) 27 | public class MixinRenderCrystal { 28 | 29 | @Redirect(method={"doRender"}, at=@At(value="INVOKE", target="Lnet/minecraft/client/model/ModelBase;render(Lnet/minecraft/entity/Entity;FFFFFF)V")) 30 | public void renderModelBaseHook(ModelBase modelBase, Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { 31 | NewRenderEntityEvent event = new NewRenderEntityEvent(modelBase, entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); 32 | GameSense.EVENT_BUS.post(event); 33 | if (!event.isCancelled()) { 34 | modelBase.render(entityIn, limbSwing, event.limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinRenderGlobal.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.api.event.events.DrawBlockDamageEvent; 4 | import com.gamesense.client.GameSense; 5 | import com.gamesense.client.module.ModuleManager; 6 | import com.gamesense.client.module.modules.render.BlockHighlight; 7 | import net.minecraft.client.renderer.BufferBuilder; 8 | import net.minecraft.client.renderer.RenderGlobal; 9 | import net.minecraft.client.renderer.Tessellator; 10 | import net.minecraft.entity.Entity; 11 | import net.minecraft.entity.player.EntityPlayer; 12 | import net.minecraft.util.math.RayTraceResult; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.injection.At; 15 | import org.spongepowered.asm.mixin.injection.Inject; 16 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 17 | 18 | /** 19 | * @author Hoosiers 20 | * @since 12/14/2020 21 | */ 22 | 23 | @Mixin(RenderGlobal.class) 24 | public class MixinRenderGlobal { 25 | 26 | @Inject(method = "drawSelectionBox", at = @At("HEAD"), cancellable = true) 27 | public void drawSelectionBox(EntityPlayer player, RayTraceResult movingObjectPositionIn, int execute, float partialTicks, CallbackInfo callbackInfo) { 28 | if (ModuleManager.isModuleEnabled(BlockHighlight.class)) { 29 | callbackInfo.cancel(); 30 | } 31 | } 32 | 33 | @Inject(method = "drawBlockDamageTexture", at = @At("HEAD"), cancellable = true) 34 | public void drawBlockDamageTexture(Tessellator tessellatorIn, BufferBuilder bufferBuilderIn, Entity entityIn, float partialTicks, CallbackInfo callbackInfo) { 35 | DrawBlockDamageEvent drawBlockDamageEvent = new DrawBlockDamageEvent(); 36 | 37 | GameSense.EVENT_BUS.post(drawBlockDamageEvent); 38 | 39 | if (drawBlockDamageEvent.isCancelled()) { 40 | callbackInfo.cancel(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinRenderItem.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.render.RainbowEnchant; 5 | import net.minecraft.client.renderer.RenderItem; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.ModifyArg; 9 | 10 | import java.awt.*; 11 | 12 | @Mixin(RenderItem.class) 13 | public class MixinRenderItem { 14 | 15 | int a2; 16 | int a4; 17 | int a3; 18 | @ModifyArg(method = "renderEffect", at = @At(value = "INVOKE", target = "net/minecraft/client/renderer/RenderItem.renderModel(Lnet/minecraft/client/renderer/block/model/IBakedModel;I)V"), index = 1) 19 | private int renderEffect(int oldValue) { 20 | RainbowEnchant rainbowEnchant = ModuleManager.getModule(RainbowEnchant.class); 21 | if (rainbowEnchant.isEnabled()) { 22 | a2 = rainbowEnchant.color.getValue().getRed(); 23 | a4 = rainbowEnchant.color.getValue().getGreen(); 24 | a3 = rainbowEnchant.color.getValue().getBlue(); 25 | return new Color(a2, a4, a3).getRGB(); 26 | } return oldValue; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinRenderPlayer.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.hud.TargetHUD; 5 | import com.gamesense.client.module.modules.hud.TargetInfo; 6 | import com.gamesense.client.module.modules.render.Nametags; 7 | import com.gamesense.client.module.modules.render.Shaders; 8 | import net.minecraft.client.entity.AbstractClientPlayer; 9 | import net.minecraft.client.renderer.entity.RenderPlayer; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | @Mixin(RenderPlayer.class) 16 | public abstract class MixinRenderPlayer { 17 | 18 | @Inject(method = "renderEntityName", at = @At("HEAD"), cancellable = true) 19 | private void renderLivingLabel(AbstractClientPlayer entity, double x, double y, double z, String name, double distanceSq, CallbackInfo callbackInfo) { 20 | 21 | if (entity.getName().length() == 0) 22 | callbackInfo.cancel(); 23 | 24 | 25 | if (ModuleManager.isModuleEnabled(Nametags.class)) { 26 | callbackInfo.cancel(); 27 | } 28 | 29 | if (ModuleManager.isModuleEnabled(TargetHUD.class) && TargetHUD.isRenderingEntity(entity)) { 30 | callbackInfo.cancel(); 31 | } 32 | 33 | if (ModuleManager.isModuleEnabled(TargetInfo.class) && TargetInfo.isRenderingEntity(entity)) { 34 | callbackInfo.cancel(); 35 | } 36 | 37 | if (!ModuleManager.getModule(Shaders.class).renderTags) 38 | callbackInfo.cancel(); 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/MixinServerPing.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins; 2 | 3 | import com.gamesense.client.module.ModuleManager; 4 | import com.gamesense.client.module.modules.misc.AntiPing; 5 | import net.minecraft.client.multiplayer.ServerData; 6 | import net.minecraft.client.network.ServerPinger; 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(ServerPinger.class) 13 | public class MixinServerPing { 14 | 15 | @Inject(method = "ping", at = @At("HEAD"), cancellable = true) 16 | public void pingHook(ServerData server, CallbackInfo ci) { 17 | if (ModuleManager.isModuleEnabled(AntiPing.class)) 18 | ci.cancel(); 19 | } 20 | 21 | @Inject(method = "tryCompatibilityPing", at = @At("HEAD"), cancellable = true) 22 | public void tryCompatibilityPingHook(ServerData server, CallbackInfo ci) { 23 | if (ModuleManager.isModuleEnabled(AntiPing.class)) 24 | ci.cancel(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/accessor/AccessorCPacketAttack.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins.accessor; 2 | 3 | import net.minecraft.network.play.client.CPacketUseEntity; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(CPacketUseEntity.class) 8 | public interface AccessorCPacketAttack { 9 | 10 | @Accessor("entityId") 11 | int getId(); 12 | 13 | @Accessor("entityId") 14 | void setId(int value); 15 | 16 | @Accessor("action") 17 | void setAction(CPacketUseEntity.Action value); 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/accessor/AccessorEntityPlayerSP.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins.accessor; 2 | 3 | import net.minecraft.client.entity.EntityPlayerSP; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(EntityPlayerSP.class) 8 | public interface AccessorEntityPlayerSP { 9 | 10 | @Accessor("handActive") 11 | void gsSetHandActive(boolean value); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/accessor/IRenderGlobal.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins.accessor; 2 | 3 | import net.minecraft.client.renderer.RenderGlobal; 4 | import net.minecraft.client.shader.ShaderGroup; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(RenderGlobal.class) 9 | public interface IRenderGlobal { 10 | 11 | @Accessor("entityOutlineShader") 12 | ShaderGroup getEntityOutlineShader(); 13 | } -------------------------------------------------------------------------------- /src/main/java/com/gamesense/mixin/mixins/accessor/IShaderGroup.java: -------------------------------------------------------------------------------- 1 | package com.gamesense.mixin.mixins.accessor; 2 | 3 | import net.minecraft.client.shader.Shader; 4 | import net.minecraft.client.shader.ShaderGroup; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | import java.util.List; 9 | 10 | @Mixin(ShaderGroup.class) 11 | public interface IShaderGroup { 12 | 13 | @Accessor("listShaders") 14 | List getListShaders(); 15 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/gamesense.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechAle/gsplusplus/9c030e5b799c6248f1e7a58d88f78f963ff9efc2/src/main/resources/assets/gamesense/gamesense.png -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/aqua.frag: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | #endif 4 | 5 | #extension GL_OES_standard_derivatives : enable 6 | 7 | uniform sampler2D texture; 8 | 9 | uniform float time; 10 | uniform vec2 resolution; 11 | uniform vec4 rgba; 12 | uniform int lines; 13 | uniform float tau; 14 | 15 | void main() { 16 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 17 | 18 | if(centerCol.a == 0.0) { 19 | gl_FragColor = vec4(centerCol.rgb, 0); 20 | } else { 21 | float letime = time * .5+23.0; 22 | // uv should be the 0-1 uv of texture... 23 | vec2 uv = gl_FragCoord.xy / resolution.xy; 24 | 25 | #ifdef SHOW_TILING 26 | 27 | vec2 p = mod(uv*tau*2.0, tau)-250.0; 28 | #else 29 | vec2 p = mod(uv*tau, tau)-250.0; 30 | #endif 31 | vec2 i = vec2(p); 32 | float c = 1.0; 33 | float inten = .005; 34 | 35 | for (int n = 0; n < lines; n++) 36 | { 37 | float t = letime * (1.0 - (3.5 / float(n+1))); 38 | i = p + vec2(cos(t - i.x) + sin(t + i.y), sin(t - i.y) + cos(t + i.x)); 39 | c += 1.0/length(vec2(p.x / (sin(i.x+t)/inten) ,p.y / (cos(i.y+t)/inten))); 40 | } 41 | c /= float(lines); 42 | c = 1.17-pow(c, 1.4); 43 | vec3 colour = vec3(pow(abs(c), 8.0)); 44 | colour = clamp(colour + vec3(rgba[0], rgba[1], rgba[2]), 0.0, 1.0); 45 | 46 | 47 | #ifdef SHOW_TILING 48 | // Flash tile borders... 49 | vec2 pixel = 100000000.0 / iResolution.xy; 50 | uv *= 2.0; 51 | 52 | float f = floor(mod(iTime*.5, 2.0)); // Flash value. 53 | vec2 first = step(pixel, uv) * f; // Rule out first screen pixels and flash. 54 | uv = step(fract(uv), pixel); // Add one line of pixels per tile. 55 | colour = mix(colour, vec3(1.0, 1.0, 0.0), (uv.x + uv.y) * first.x * first.y); // Yellow line 56 | 57 | #endif 58 | gl_FragColor = vec4(colour, rgba[3]); 59 | } 60 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/circle.frag: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | #endif 4 | 5 | #extension GL_OES_standard_derivatives : enable 6 | 7 | uniform sampler2D texture; 8 | 9 | uniform float time; 10 | uniform vec2 resolution; 11 | 12 | uniform float PI; 13 | uniform float rad; 14 | 15 | uniform vec4 colors; 16 | 17 | void main() { 18 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 19 | 20 | if(centerCol.a == 0.0) { 21 | gl_FragColor = vec4(centerCol.rgb, 0); 22 | } else { 23 | 24 | vec2 position = ( gl_FragCoord.xy / resolution.xy ); 25 | float y = sin(time * 4.0) * rad; 26 | float x = cos(time * 4.0) * rad; 27 | float y2 = sin(time * 3.1) * rad; 28 | float x2 = cos(time * 3.1) * rad; 29 | float y3 = sin(time * 1.2) * rad; 30 | float x3 = cos(time * 1.2) * rad; 31 | 32 | float color = colors[0]; 33 | color += sin(x + position.x * PI * 1.0) * sin(y + position.y * PI * 1.0); 34 | float color2 = colors[1]; 35 | color2 += sin(x2 + position.x * PI * 1.0) * sin(y2 + position.y * PI * 1.0); 36 | float color3 = colors[2]; 37 | color3 += sin(x3 + position.x * PI * 1.0) * sin(y3 + position.y * PI * 1.0); 38 | 39 | gl_FragColor = vec4( color, color2, color3, colors[3] ); 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/default.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform sampler2D texture; 4 | uniform vec2 texelSize; 5 | uniform float alpha0; 6 | 7 | uniform vec3 color; 8 | 9 | uniform float radius; 10 | uniform float divider; 11 | uniform float maxSample; 12 | uniform vec2 resolution; 13 | uniform float time; 14 | 15 | vec3 getColor(vec4 centerCol) { 16 | return vec3(-1); 17 | } 18 | 19 | void main() { 20 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 21 | 22 | if(centerCol.a != 0) { 23 | gl_FragColor = vec4(centerCol.rgb, 0); 24 | } else { 25 | 26 | float alphaOutline = 0; 27 | vec3 colorFinal = vec3(-1); 28 | 29 | for (float x = -radius; x < radius; x++) { 30 | for (float y = -radius; y < radius; y++) { 31 | vec4 currentColor = texture2D(texture, gl_TexCoord[0].xy + vec2(texelSize.x * x, texelSize.y * y)); 32 | 33 | if (currentColor.a != 0) 34 | if (alpha0 == -1.0) { 35 | if (colorFinal[0] == -1) { 36 | colorFinal = getColor(centerCol); 37 | } 38 | alphaOutline += divider > 0 ? max(0, (maxSample - distance(vec2(x, y), vec2(0))) / divider) : 1; 39 | } 40 | else { 41 | gl_FragColor = vec4(getColor(centerCol), alpha0); 42 | return; 43 | } 44 | } 45 | } 46 | gl_FragColor = vec4(colorFinal, alphaOutline); 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/fill.frag: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | #endif 4 | 5 | uniform sampler2D texture; 6 | 7 | uniform vec4 color; 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | void main() 16 | { 17 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 18 | 19 | if (centerCol.a == 0.0) { 20 | gl_FragColor = vec4(centerCol.rgb, 0); 21 | } else { 22 | gl_FragColor = color; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/glow.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform sampler2D texture; 4 | uniform vec2 texelSize; 5 | uniform float alpha0; 6 | 7 | uniform vec3 color; 8 | 9 | uniform float radius; 10 | uniform float divider; 11 | uniform float maxSample; 12 | 13 | 14 | void main() { 15 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 16 | 17 | if(centerCol.a != 0) { 18 | gl_FragColor = vec4(centerCol.rgb, 0); 19 | } else { 20 | 21 | float alphaOutline = 0; 22 | 23 | for (float x = -radius; x < radius; x++) { 24 | for (float y = -radius; y < radius; y++) { 25 | vec4 currentColor = texture2D(texture, gl_TexCoord[0].xy + vec2(texelSize.x * x, texelSize.y * y)); 26 | 27 | if (currentColor.a != 0) 28 | if (alpha0 == -1.0) { 29 | alphaOutline += divider > 0 ? max(0, (maxSample - distance(vec2(x, y), vec2(0))) / divider) : 1; 30 | } 31 | else { 32 | gl_FragColor = vec4(color, alpha0); 33 | return; 34 | } 35 | } 36 | } 37 | gl_FragColor = vec4(color, alphaOutline); 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/resources/assets/gamesense/shaders/fragment/gradient.frag: -------------------------------------------------------------------------------- 1 | 2 | #ifdef GL_ES 3 | precision mediump float; 4 | #endif 5 | 6 | #extension GL_OES_standard_derivatives : enable 7 | 8 | uniform int NUM_OCTAVES; 9 | uniform float time; 10 | uniform float Creepy; 11 | uniform float moreGradient; 12 | uniform float alpha; 13 | uniform sampler2D texture; 14 | uniform vec2 resolution; 15 | 16 | float random(vec2 pos) { 17 | return fract(sin(dot(pos.xy, vec2(12.9898, 78.233))) * 43758.5453123); 18 | } 19 | 20 | float noise(vec2 pos) { 21 | vec2 i = floor(pos); 22 | vec2 f = fract(pos); 23 | float a = random(i + vec2(0.0, 0.0)); 24 | float b = random(i + vec2(1.0, 0.0)); 25 | float c = random(i + vec2(0.0, 1.0)); 26 | float d = random(i + vec2(1.0, 1.0)); 27 | vec2 u = f * f * (3.0 - 2.0 * f); 28 | return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y; 29 | } 30 | 31 | float fbm(vec2 pos) { 32 | float v = 0.0; 33 | float a = 0.5; 34 | mat2 rot = mat2(cos(0.1), sin(0.5), -sin(0.5), cos(0.5)); 35 | for (int i=0; i