-
-
Notifications
You must be signed in to change notification settings - Fork 300
setBlockLight should define setBlockLight and resolve a few other minor inconsistencies #3365
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: main
Are you sure you want to change the base?
Conversation
…or inconsistencies
SirYwell
left a comment
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.
Mostly good, but please take another look at the usages of getBlockIS() regarding nullness if you're already at it.
| if (region != null && !region.contains(ox, oz)) { | ||
| return summary; | ||
| } | ||
| try (FaweInputStream fis = getBlockIS()) { |
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.
if getBlockIS() can indeed return null, then this needs to be covered here as well
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.
if
getBlockIS()can indeed return null, then this needs to be covered here as well
Assuming you just wanted a simple NPE check, done so.
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.
Should be possible to just do the null check at the top inside the try-with-resources statement, no?
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.
Should be possible to just do the null check at the top inside the try-with-resources statement, no?
I guess that would take a cleaner approach. I'm dumb.
SirYwell
left a comment
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.
Thanks
I addressed these in my larger Folia pull request, and because of rejection, I would like to forward these upstream separately. I am confident a lot of these issues aren't intentional. If any of these changes are deliberate, I'd be more than happy to revise!