-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ArrayList module overlap bug #834
Conversation
Improve Hypixel mode of Step Add 'Fix hypixel switch (beta)' to KillAura
Add "Store","Timer" mode to rapid fire of RageBot Add No spread to RageBot Add ignoreTeammatesCSGO to RageBot Fix RageBot select hit pos wrongly Add Snap mode to AntiAim Add onlyWhileSneaking to AntiAim Fix freeze issue of HypixelMotionDisabler Fix Post issue of RageBot Fix WatchdogAutoPhase Fix bad packet send/receive
Fix LegitNoSpread keep switching Add 'Legit switch' to rapid fire Fix SnapAntiAim rotate wrongly Fix StoreRapidFire always store
Add window title Add 'reflection' to Script API. Example: ```java reflection.set( modules.getModule("TimerRange"), "hasLag", 0 ); ``` In this case, we reset the 'hasLag' variable of TimerRange module to 0. reflection allows to change the module itself. See ```keystrokesmod.utility.Reflection``` to know more about the reflection API.
Co-authored-by: xia__mc <[email protected]>
Stop using deprecation feature (event bus) Remove SilenceIRC
Fix Scale option of KillAura
Fix HypixelBlinkNoFall Improve HypixelTower
remove useless image
Add ScaffoldC check to Anticheat Improve Hypixel mode of Velocity Fix JumpD sprint mode of Scaffold buggy Remove Aim checks from Anticheat (reason: useless)
# Conflicts: # src/main/java/keystrokesmod/mixins/impl/client/MixinMinecraft.java # src/main/java/keystrokesmod/module/ModuleManager.java # src/main/java/keystrokesmod/module/impl/combat/KillAura.java # src/main/java/keystrokesmod/module/impl/combat/autoclicker/DragClickAutoClicker.java # src/main/java/keystrokesmod/module/impl/combat/autoclicker/RecordAutoClicker.java # src/main/java/keystrokesmod/module/impl/movement/longjump/HypixelFireballLongJump.java # src/main/java/keystrokesmod/module/impl/movement/longjump/hypixelfireball/SameYHypixelFireballLongJump.java # src/main/java/keystrokesmod/module/impl/movement/step/HypixelStep.java # src/main/java/keystrokesmod/module/impl/other/Anticheat.java # src/main/java/keystrokesmod/module/impl/other/RotationHandler.java # src/main/java/keystrokesmod/module/impl/other/anticheats/Check.java # src/main/java/keystrokesmod/module/impl/render/Watermark.java # src/main/java/keystrokesmod/module/impl/world/Tower.java # src/main/java/keystrokesmod/module/impl/world/tower/HypixelTower.java # src/main/java/keystrokesmod/utility/Commands.java # src/main/java/keystrokesmod/utility/Reflection.java
…owdown' to KillAura Add 'progressbar' to BreakProgress Improve RavenNewTargetHUD Fix Simulation watchdog flags issue
Add 'rotation' to BedAura
# Conflicts: # src/main/java/keystrokesmod/mixins/impl/entity/MixinEntityPlayerSP.java # src/main/java/keystrokesmod/module/impl/movement/speed/HypixelSpeed.java # src/main/java/keystrokesmod/module/impl/other/RotationHandler.java # src/main/java/keystrokesmod/module/impl/render/Watermark.java
# Conflicts: # src/main/java/keystrokesmod/module/impl/combat/AutoGapple.java # src/main/java/keystrokesmod/module/impl/render/ArrayList.java
📝 WalkthroughWalkthroughThe changes in this pull request involve updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ArrayList
participant ArrayListModule
User->>ArrayList: Request to render modules
ArrayList->>ArrayList: Call updateArrayList()
ArrayList->>ArrayList: Process organizedModules
ArrayList->>ArrayListModule: Check if module is enabled
ArrayListModule->>ArrayListModule: Return module.isEnabled()
ArrayList->>User: Render modules based on enabled state
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Outside diff range comments (2)
build.gradle (1)
Line range hint
67-69
: Consider using Maven/Gradle dependencies instead of local jars.Using local jar files (
libraries/fastutil-core-8.5.14-javadoc.jar
,libraries/json-20220924.jar
,libraries/discord-rpc.jar
) makes the build less reproducible and harder to maintain. Consider publishing these dependencies to a Maven repository or using existing Maven artifacts:
- For JSON:
org.json:json:20220924
- For FastUtil:
it.unimi.dsi:fastutil:8.5.14
Also applies to: 71-73
src/main/java/keystrokesmod/module/impl/render/ArrayList.java (1)
Line range hint
89-194
: Comprehensive fix for module overlap.The overlap bug has been addressed through multiple complementary changes:
- Reduced shadow size prevents visual overlap
- Improved module state management ensures accurate rendering
- Proper cleanup of disabled modules prevents stale entries
These changes work together to provide a robust solution to the overlap issue.
Consider adding unit tests to verify these fixes:
- Test module cleanup on disable
- Test shadow size calculations
- Test module state transitions
Would you like me to help create these tests?🧰 Tools
🪛 ast-grep
[warning] 186-186: Detected a cookie where the
Secure
flag is either missing or disabled. TheSecure
cookie flag instructs the browser to forbid sending the cookie over an insecure HTTP request. Set theSecure
flag totrue
so the cookie will only be sent over HTTPS.
Context: (module, new ArrayListModule(module))
Note: [CWE-614]: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute [OWASP A05:2021]: Security Misconfiguration [REFERENCES]
- https://owasp.org/Top10/A05_2021-Security_Misconfiguration
[warning] 186-186: Detected a cookie where the
HttpOnly
flag is either missing or disabled. TheHttpOnly
cookie flag instructs the browser to forbid client-side JavaScript to read the cookie. If JavaScript interaction is required, you can ignore this finding. However, set theHttpOnly
flag to true` in all other cases.
Context: (module, new ArrayListModule(module))
Note: [CWE-1004]: Sensitive Cookie Without 'HttpOnly' Flag [OWASP A05:2021]: Security Misconfiguration [REFERENCES]
- https://owasp.org/Top10/A05_2021-Security_Misconfiguration
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (3)
build.gradle
(1 hunks)src/main/java/keystrokesmod/module/impl/render/ArrayList.java
(4 hunks)src/main/java/keystrokesmod/module/impl/render/arraylist/ArrayListModule.java
(1 hunks)
🧰 Additional context used
🪛 ast-grep
src/main/java/keystrokesmod/module/impl/render/ArrayList.java
[warning] 186-186: Detected a cookie where the Secure
flag is either missing or disabled. The Secure
cookie flag instructs the browser to forbid sending the cookie over an insecure HTTP request. Set the Secure
flag to true
so the cookie will only be sent over HTTPS.
Context: (module, new ArrayListModule(module))
Note: [CWE-614]: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute [OWASP A05:2021]: Security Misconfiguration [REFERENCES]
- https://owasp.org/Top10/A05_2021-Security_Misconfiguration
[warning] 186-186: Detected a cookie where the HttpOnly
flag is either missing or disabled. The HttpOnly
cookie flag instructs the browser to forbid client-side JavaScript to read the cookie. If JavaScript interaction is required, you can ignore this finding. However, set the HttpOnly
flag to true` in all other cases.
Context: (module, new ArrayListModule(module))
Note: [CWE-1004]: Sensitive Cookie Without 'HttpOnly' Flag [OWASP A05:2021]: Security Misconfiguration [REFERENCES]
- https://owasp.org/Top10/A05_2021-Security_Misconfiguration
🔇 Additional comments (6)
src/main/java/keystrokesmod/module/impl/render/arraylist/ArrayListModule.java (1)
29-29
: Verify the visual transition behavior.
While this change fixes the overlap bug by ensuring modules are only rendered when enabled, it might cause abrupt visual transitions since modules now appear/disappear instantly instead of fading with the animation.
✅ Verification successful
Let me gather more information about the animation code to verify the impact on visual transitions.
Let me gather more information about the animation implementation to fully understand how the transitions work.
I now have enough information to provide a response about the visual transitions.
The change maintains smooth transitions despite the visibility change.
While the visibility check now uses module.isEnabled()
directly, the animations are still properly handled:
- The module uses separate animations for both X and Y coordinates via
animeX
andanimeY
with EASE_OUT_EXPO easing - The animations continue to run in
onUpdate()
with smooth transitions:- When enabled:
animeX.run(1)
- When disabled:
animeX.run(0)
- When enabled:
- The actual rendering position is calculated using the animation values in
getPosX()
andgetPosY()
The change only affects when modules are rendered, not how smoothly they transition. The animations still provide smooth movement while modules are being enabled/disabled.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any related visual transition or rendering code
rg -A 5 "render|transition|fade" --type java
Length of output: 316647
Script:
#!/bin/bash
# Search for animation related code in the ArrayList module
ast-grep --pattern $'class ArrayListModule {
$$$
shouldRender() {
$$$
}
$$$
}'
# Search for animation value usage
rg -A 5 "animeX" --type java
Length of output: 2214
Script:
#!/bin/bash
# Check the Animation class implementation
rg -A 10 "class Animation" --type java
# Look for animation value usage in rendering
ast-grep --pattern 'render($$$) {
$$$
getValue()
$$$
}'
Length of output: 3946
build.gradle (2)
Line range hint 45-54
: LGTM! Well-structured dependency management.
The dependency configuration is well organized:
- Proper exclusions for mixin to avoid conflicts
- Clear separation between implementation and embed configurations
- Essential dependencies for Minecraft modding included
Also applies to: 56-63
Line range hint 75-102
: LGTM! Correct resource processing and jar packaging.
The resource processing and jar packaging configuration is properly set up:
- Correct handling of mcmod.info version expansion
- Appropriate exclusions in jar packaging
- Required FML and Mixin manifest attributes
src/main/java/keystrokesmod/module/impl/render/ArrayList.java (3)
179-181
: LGTM: Simplified method signature.
Removing the unused IFont parameter improves the method's interface.
216-216
: LGTM: Simplified conditional logic.
The ternary operator makes the code more concise while maintaining the same behavior.
99-99
: LGTM: Shadow size reduction helps prevent overlap.
The reduction of shadowExtra from 1.0 to 0.5 times the size input should help prevent module overlap by reducing the shadow footprint.
Let's verify the visual impact:
✅ Verification successful
Verified: Shadow size reduction is consistently applied throughout the rendering logic
The change to shadowExtra
calculation (0.5 multiplier) is correctly propagated through all its usages in the ArrayList module:
- Used consistently in background rendering calculations
- Applied uniformly for both left and right alignments
- Affects blur and background rendering equally through the lineInterval calculation
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for other shadow-related calculations that might need similar adjustment
rg -g '*.java' 'shadowExtra|shadow.*size' --type java
Length of output: 2278
Summary by CodeRabbit
New Features
Bug Fixes
Documentation