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
Conversation
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.
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 is this pr done ? |
yep |
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 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!
src/main/java/com/sinthoras/visualprospecting/database/WorldCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/WorldCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/WorldCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/DimensionCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/DimensionCache.java
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/cachebuilder/WorldAnalysis.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sinthoras/visualprospecting/database/DimensionCache.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Johann Bernhardt <johann.bernhardt@posteo.de>
This time it should actually work.
TODO:
Test on maps created before this fix.