-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
BarrierEsp #743
BarrierEsp #743
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Walkthrough## Walkthrough
The changes introduced a new hack called `BarrierEspHack` to the `WurstClient` application. This hack is added to the `HackList` and its functionality is implemented via a mixin class `ClientWorldMixin` that modifies the `getBlockParticle` method in `ClientWorld`. The hack's status is checked and the return value of the method is altered based on the hack's status and certain game conditions.
## Changes
| File Path | Change Summary |
| --- | --- |
| `.../hack/BarrierEspHack.java`<br>`.../hacks/BarrierEspHack.java` | Added a new Java class `BarrierEspHack` that extends the `Hack` class, sets the hack name to "BarrierESP", and includes search tags. |
| `.../hack/HackList.java` | Included the new `BarrierEspHack` class in the `HackList` with no changes to existing code. |
| `.../mixin/ClientWorldMixin.java` | Added a mixin class `ClientWorldMixin` that intercepts the `getBlockParticle` method in `ClientWorld`. It checks the status of `BarrierEspHack` and modifies the return value based on the hack's status and game conditions. | TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/main/resources/wurst.mixins.json
Files selected for processing (3)
- src/main/java/net/wurstclient/hack/BarrierEspHack.java (1 hunks)
- src/main/java/net/wurstclient/hack/HackList.java (1 hunks)
- src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1 hunks)
Files skipped from review due to trivial changes (1)
- src/main/java/net/wurstclient/hack/HackList.java
Additional comments: 2
src/main/java/net/wurstclient/hack/BarrierEspHack.java (1)
- 1-9: The
BarrierEspHack
class is well-defined and extends theHack
class as expected. However, it's currently empty and doesn't override or implement any methods. If there are any methods in theHack
class that should be overridden or implemented in this class, they should be added. If not, this class is fine as it is.src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1)
- 1-23: The mixin class
ClientWorldMixin
is correctly implemented. It injects a methodgetBlockParticle
into theClientWorld
class. The injected method checks if thebarrierEspHack
is enabled in theWurstClient
instance and returnsBlocks.BARRIER
if it is. The original return value of thegetBlockParticle
method is overridden.However, it's important to note that this change will affect all particles in the game when the hack is enabled, not just barrier blocks. If this is the intended behavior, then the implementation is correct. If not, you may need to refine the logic to only affect barrier blocks.
Yes, I forgot to add a check that is it a barrier or a light block. Sorry about that. |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/main/resources/assets/wurst/lang/en_us.json
Files selected for processing (1)
- src/main/java/net/wurstclient/hacks/BarrierEspHack.java (1 hunks)
Additional comments: 1
src/main/java/net/wurstclient/hacks/BarrierEspHack.java (1)
- 1-11: The
BarrierEspHack
class is currently a stub with no functionality beyond setting the name of the hack. Ensure that the implementation of the hack's functionality is planned for a future commit.
I realized that we don't need a check for light blocks because it indicates barrier blocks only. |
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/main/resources/assets/wurst/lang/en_us.json
Files selected for processing (2)
- src/main/java/net/wurstclient/hacks/BarrierEspHack.java (1 hunks)
- src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1 hunks)
Files skipped from review due to trivial changes (1)
- src/main/java/net/wurstclient/hacks/BarrierEspHack.java
Additional comments: 3
src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (3)
1-7: Ensure that the copyright notice is up-to-date and correctly attributed.
35-37: The method signature in the
@Inject
annotation seems incorrect. It should include the method parameters. Please verify this.47-47: This line changes the return value of the
getBlockParticle
method toBlocks.BARRIER
when the conditions are met. Ensure that this does not cause any unintended side effects in the game.
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.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (1)
- src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1 hunks)
Additional comments: 1
src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1)
- 1-7: Ensure that the copyright notice is up-to-date and correctly attributed.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (1 hunks)
Additional comments: 4
src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (4)
35-37: The method signature in the
@Inject
annotation seems correct. The previous comment was incorrect.40-41: The
barrierEspHack
is a final field and cannot be null. The previous comment was incorrect.45-47: The
interactionManager
andplayer
are accessed without null checks in the originalClientWorld.getBlockParticle()
method, so it's safe to assume they won't be null here. The previous comment was incorrect.49-49: The
setReturnValue
method does not throw an exception if theCallbackInfoReturnable
is already cancelled. The previous comment was incorrect.
Description
#715
Warning: It's only works when the Particles is set to all