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

NoPortalOverlay #827

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ThisTestUser
Copy link
Contributor

@ThisTestUser ThisTestUser commented May 28, 2023

Gets rid of the portal overlay when standing in a portal in survival.

Summary by CodeRabbit

  • New Features
    • Introduced the "No Portal Overlay" option to remove the portal overlay in the game.

@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, although with this PR and NoBlockOverlay (#728), we would have a lot of different NoXOverlay hacks. It might be better to combine them all into one.

Copy link

coderabbitai bot commented Jan 2, 2024

Walkthrough

Walkthrough

The changes encompass the addition of a feature in the Wurst Minecraft client mod that enables players to disable the portal overlay effect. This enhancement includes introducing a new hack (NoPortalOverlayHack) and updating the game's heads-up display code (IngameHudMixin) to selectively prevent the overlay effect based on the hack's status.

Changes

File Path Change Summary
.../hack/HackList.java,
.../hacks/NoPortalOverlayHack.java
.../mixin/IngameHudMixin.java
Added a new NoPortalOverlayHack instance to the hack list.
Introduced a new class to remove the portal overlay rendering.
Implemented a method to conditionally cancel portal overlay rendering.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 6c6fba9 and ee3c219.
Files ignored due to filter (1)
  • src/main/resources/assets/wurst/lang/en_us.json
Files selected for processing (3)
  • src/main/java/net/wurstclient/hack/HackList.java (1 hunks)
  • src/main/java/net/wurstclient/hacks/NoPortalOverlayHack.java (1 hunks)
  • src/main/java/net/wurstclient/mixin/IngameHudMixin.java (1 hunks)
Additional comments: 3
src/main/java/net/wurstclient/hacks/NoPortalOverlayHack.java (1)
  • 1-24: The class NoPortalOverlayHack is well-structured and follows Java conventions. The constructor sets the hack's name and category appropriately.
src/main/java/net/wurstclient/mixin/IngameHudMixin.java (1)
  • 59-70: Verify that the WurstClient.INSTANCE is reliably instantiated before the onRenderPortalOverlay method is called to prevent potential null pointer exceptions.
src/main/java/net/wurstclient/hack/HackList.java (1)
  • 138-145: The addition of NoPortalOverlayHack to HackList follows the established pattern and is correctly instantiated.

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 ee3c219 and af92a18.
Files selected for processing (1)
  • src/main/java/net/wurstclient/hacks/NoPortalOverlayHack.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/net/wurstclient/hacks/NoPortalOverlayHack.java

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

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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between af92a18 and 6925b44.
Files ignored due to path filters (1)
  • src/main/resources/assets/wurst/lang/en_us.json is excluded by !**/*.json
Files selected for processing (1)
  • src/main/java/net/wurstclient/mixin/IngameHudMixin.java (1 hunks)
Additional comments not posted (2)
src/main/java/net/wurstclient/mixin/IngameHudMixin.java (2)

65-68: Check the use of WurstClient.INSTANCE for potential thread-safety issues.

Verification successful

The WurstClient class is defined as an enum, which inherently provides thread-safety guarantees for its instances. Enums in Java are thread-safe and provide a singleton guarantee, ensuring that the instance is created in a thread-safe manner.

Given this information, the use of WurstClient.INSTANCE does not pose any thread-safety issues.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the thread-safety of `WurstClient.INSTANCE`.

# Test: Search for usage of `WurstClient.INSTANCE` across the project. Expect: Proper synchronization or single-threaded access.
rg --type java 'WurstClient.INSTANCE' --files-with-matches

Length of output: 6418



Script:

#!/bin/bash
# Description: Verify the thread-safety of `WurstClient.INSTANCE`.

# Step 1: Find the definition and initialization of `WurstClient.INSTANCE`.
rg --type java 'class WurstClient' --files-with-matches
rg --type java 'INSTANCE' --files-with-matches

# Step 2: Check for synchronization mechanisms around its usage.
rg --type java 'synchronized' --files-with-matches

Length of output: 7379



Script:

#!/bin/bash
# Description: Verify the thread-safety of `WurstClient.INSTANCE`.

# Step 1: Examine the definition and initialization of `WurstClient.INSTANCE` in `WurstClient.java`.
rg --type java 'public static final WurstClient INSTANCE' src/main/java/net/wurstclient/WurstClient.java

# Step 2: Check if `WurstClient.INSTANCE` is thread-safe by design.
rg --type java 'WurstClient' src/main/java/net/wurstclient/WurstClient.java

Length of output: 206


59-69: Ensure proper integration of onRenderPortalOverlay with other methods in IngameHudMixin.

@Alexander01998 Alexander01998 added type:enhancement New feature or request type:new feature A new hack/command/etc. category:render status:never-stale Prevents stalebot from marking this item as stale. and removed status:stale labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:render status:never-stale Prevents stalebot from marking this item as stale. 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.

2 participants