-
-
Notifications
You must be signed in to change notification settings - Fork 7
Fixes #249 #301
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
base: master
Are you sure you want to change the base?
Fixes #249 #301
Conversation
Summary of ChangesHello @failutee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where dynamic border blocks were not correctly restored to their original state after being hidden, leading to visual inconsistencies for players. The changes introduce a robust mechanism to capture and store the original block types, allowing for precise restoration when the border is no longer active. This enhancement significantly improves the visual fidelity and overall user experience of the border animation system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Summary of ChangesHello @failutee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where the animated border blocks were not correctly reverting to their original state after being hidden. The changes introduce a robust system to store the original block types at border locations and restore them precisely, preventing permanent alterations to the game world and ensuring a seamless visual experience for players. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a significant improvement by correctly handling border block placement to avoid permanently destroying existing blocks. It now saves the original blocks before displaying the border and restores them afterward. The refactoring to centralize lock acquisition and rename methods for clarity is well done. I've identified one critical issue and a couple of medium-severity suggestions for improvement. The critical issue is in the updatePlayer method, which doesn't seem to save original blocks during border updates, potentially reintroducing the bug this PR aims to fix. I've also suggested improving a method name for clarity and optimizing how block IDs are resolved.
...lugin/src/main/java/com/eternalcode/combat/border/animation/block/BorderBlockController.java
Show resolved
Hide resolved
...lugin/src/main/java/com/eternalcode/combat/border/animation/block/BorderBlockController.java
Outdated
Show resolved
Hide resolved
...lugin/src/main/java/com/eternalcode/combat/border/animation/block/BorderBlockController.java
Outdated
Show resolved
Hide resolved
…er/animation/block/BorderBlockController.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.
Code Review
This pull request correctly fixes an issue where the border visualization would destroy non-solid blocks by implementing a mechanism to save and restore the original blocks. The refactoring and renaming of methods also improve code clarity. I've found two significant issues: a critical race condition in onBorderShowAsyncEvent that could lead to data corruption, and a high-severity memory leak where player data is not cleaned up from the new maps upon logout. Please see my detailed comments for suggestions on how to fix these issues.
Tested on: 1.21.8
Screen.Recording.2025-12-01.at.18.47.12-1.mov