Skip to content

Conversation

@Vinywar123
Copy link

I added a comment here as it took me a few hours to figure out what it was checking for.
will help readability

@bagggage bagggage moved this to Easy to Review in PRs to review Nov 19, 2025
const neighborBlock = block;
oldBlock = mesh_storage.getBlockFromRenderThread(neighborPos[0], neighborPos[1], neighborPos[2]) orelse return;
block = oldBlock;
// Check if the neighbor block has a block and that it is the same type as the placed item
Copy link
Member

@IntegratedQuantum IntegratedQuantum Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first part "Check if the neighbor block has a block" makes no sense, what does it mean for a block to have a block???
And the second part "that it is the same type as the placed item" is just describing the code, and in my opinion is not more or less readable than block.typ == itemBlock. If you think this part is unclear then a better choice would be to use a more descriptive variable name instead of a comment.

So overall in my opinion this comment, in its current state, makes the code more confusing than before.

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants