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

Fix !visualprospectingnearspawn #30

Merged
merged 16 commits into from Jul 10, 2023
Merged

Conversation

ah-OOG-ah
Copy link
Member

@ah-OOG-ah ah-OOG-ah commented May 13, 2023

This time it should actually work.
TODO:

  • Get other people to reproduce expected behavior (spawn chunks don't scan, command allows them to scan).
  • Test on a server.
  • Test on maps created before this fix.
  • Wait for Dream's PR (Bs+sa #29) to be merged.

Just a reformat + comment
This SHOULD fix VPNearSpawn. Also generates a ton of random edits because spotless said so ig.
Add the electric scanner mod for debugging.
I can't replicate the automatic bug or fix in a full environment, so I'm removing that code for now. Instead, a command to only recache spawn has been added.
@ah-OOG-ah
Copy link
Member Author

Removed the automated method, and instead use a command because I can't replicate the bug or the automated fix in a full pack anymore (still can in dev tho). Now /visualprospectingredoserverspawncache still fixes the issue, it's just much faster than the old command for large worlds.

@ah-OOG-ah ah-OOG-ah marked this pull request as ready for review May 16, 2023 20:46
@Dream-Master Dream-Master requested review from a team May 30, 2023 13:57
@Dream-Master
Copy link
Member

@ah-OOG-ah is this pr done ?

@ah-OOG-ah
Copy link
Member Author

yep

Copy link
Member

@SinTh0r4s SinTh0r4s left a comment

Choose a reason for hiding this comment

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

Thanks for fixing a bug I caused some time ago! <3

Thought I say thanks by reviewing the code a bit. Haven't touched Minecraft in a long time so I cannot approve it. But I hope you appreciate the feedback. Otherwise just ignore it. I'm glad the project is still maintained!

You are a bit overeager on comments. Comments are immensly helpfull to help the next programmer to understand what you did before, but they can quickly become a burden.

Comments don't age well. The next programmer might add a feature which changes the code, but forgets to update the comment. I don't accuse you of being lazy. Just the others.... and myself ;-)
When another dev wants to use the method he is likely to just read the comment and use it like described which leads to unexpected behaviours and bugs as the comment does not match the method any more.

Or maybe a comment does not add anything but a better name of a method or variable. Where is the value in that? You could just rename the method or variable. That has the added benefit of spreading the comment troughout the code base whereever it is referenced.

On the other side you can document your decisions while writing the code. Like you did on that one loop. That is hands-down just amazing! That helps understanding the code SO MUCH! (because it helps to understand your mindset and enables the next dev to continue your ideas) <3

Go and try out different coding styles, come back after a year or two and see how what helps you best. This is Minecraft modding and not old school MISRA C compliant code from the 90s after all ;-)

Keep up the good work!

@Dream-Master Dream-Master requested review from a team June 29, 2023 20:14
@Dream-Master Dream-Master merged commit 00efcc4 into GTNewHorizons:master Jul 10, 2023
1 check passed
@ah-OOG-ah ah-OOG-ah deleted the tmp branch July 15, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants