Skip to content
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

Added BarrierESP #790

Closed

Conversation

TheWienerMaster
Copy link
Contributor

Description

Made BarrierESP, resolves #715

Demonstration

27e7f6804e171c06ba32b548019c7224.online-video-cutter.com.mp4

@github-actions
Copy link

This pull request has been open for a while with no recent activity. If you're still working on this or waiting for a review, please add a comment or commit within the next 7 days to keep it open. Otherwise, the pull request will be automatically closed to free up time for other tasks.

Pull requests should be closed if:

  • They have been superseded by another pull request
  • They are out of scope or don't align with the project
  • They have become obsolete due to other changes
  • They have bugs or conflicts that won't be resolved

@Alexander01998
Copy link
Member

Still relevant.

@coderabbitai
Copy link

coderabbitai bot commented Oct 26, 2023

Walkthrough

Walkthrough

The proposed changes introduce a new feature, BarrierEspHack, to the Wurst Client. This feature, when enabled, modifies the game's rendering behavior to display barrier blocks. The implementation involves a new class for the hack itself and a mixin to inject the necessary code into the ClientWorld class.

Changes

File Path Summary
.../hack/HackList.java Added a new BarrierEspHack to the HackList class.
.../hacks/BarrierEspHack.java Introduced a new class BarrierEspHack that extends the Hack class. It sets the name and category of the hack.
.../mixin/ClientWorldMixin.java Injected code into the doRandomBlockDisplayTicks method of the ClientWorld class. When BarrierEspHack is enabled, it modifies the method call to display barrier blocks.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

Copy link

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 8131521 and e3bf216.
Files ignored due to filter (2)
  • src/main/resources/assets/wurst/lang/en_us.json
  • src/main/resources/wurst.mixins.json
Files selected for processing (3)
  • src/main/java/net/wurstclient/hack/HackList.java (1} hunks)
  • 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: 4
src/main/java/net/wurstclient/hack/HackList.java (1)
  • 65-65: The new BarrierEspHack is added to the HackList. Ensure that the BarrierEspHack class is properly implemented and that it extends the Hack class. Also, verify that the BarrierEspHack is added to the hax map in the HackList constructor.
src/main/java/net/wurstclient/mixin/ClientWorldMixin.java (3)
  • 1-7: The copyright notice is updated to include the year 2023, which is correct. Ensure that the copyright notice is updated in all files where necessary.

  • 21-35: The mixin for ClientWorld is implemented correctly. The doRandomBlockDisplayTicks method is modified to change the 6th argument to Blocks.BARRIER when the barrierEspHack is enabled. This should change the block display tick for barriers, presumably to render them differently. Ensure that this change does not cause any unexpected side effects in the game, such as rendering issues or performance degradation.

  • 30-31: The early return when barrierEspHack is not enabled is a good practice to avoid unnecessary computation. However, it's important to ensure that the barrierEspHack is properly initialized and can be safely accessed at this point in the code. If there's a chance that it might not be initialized yet, consider adding a null check.

- if(!WurstClient.INSTANCE.getHax().barrierEspHack.isEnabled())
+ if(WurstClient.INSTANCE.getHax().barrierEspHack == null || !WurstClient.INSTANCE.getHax().barrierEspHack.isEnabled())
Committable suggestion (Beta)
private void doRandomBlockDisplayTicks(Args args) 
{
	if(WurstClient.INSTANCE.getHax().barrierEspHack == null || !WurstClient.INSTANCE.getHax().barrierEspHack.isEnabled())
		return;

	args.set(5, Blocks.BARRIER);
}

Copy link

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between e3bf216 and 1623e9e.
Files selected for processing (1)
  • src/main/java/net/wurstclient/hack/HackList.java (1} hunks)
Additional comments: 1
src/main/java/net/wurstclient/hack/HackList.java (1)
  • 68-68: The new BarrierEspHack is added to the HackList. Ensure that the BarrierEspHack class is properly implemented and that it extends the Hack class. Also, verify that the BarrierEspHack is added to the TreeMap in the loadHacks() method to ensure it is properly initialized and can be retrieved by its name.

Alexander01998 added a commit that referenced this pull request Nov 12, 2023
@Alexander01998 Alexander01998 added type:enhancement New feature or request type:new feature A new hack/command/etc. category:render labels Nov 12, 2023
@Alexander01998
Copy link
Member

Closing this because I've decided to merge #743's BarrierESP instead. Thank you for your effort though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:render type:enhancement New feature or request type:new feature A new hack/command/etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BarrierESP hack
2 participants