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

haze test can overwrite an already existing world by default #1

Closed
Nusiq opened this issue Nov 19, 2022 · 4 comments
Closed

haze test can overwrite an already existing world by default #1

Nusiq opened this issue Nov 19, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Nusiq
Copy link

Nusiq commented Nov 19, 2022

I don't have exact reproduction steps. I was basically trying to do everything to break my world using haze and I think that the problem may depend Minecraft saving the game at the same time as haze copies files.

Haze is not safe for careless users. If you haze test while having the world open, you can easily break your world. In my case, the world could still be opened but the chunks were broken. The best solution for that problem would probably be testing whether the world is being used and preventing haze from doing any kind of operation on the world files.

@arexon
Copy link
Member

arexon commented Nov 19, 2022

I sort of had the suspicion this could happen, but never managed to get it to actually happen.

I've thought about this for a little bit and I think haze test shouldn't overwrite worlds. In practice, the only time you would use it is when you want to copy a new world to com.mojang. in addition, I can probably implement an --overwrite flag for when you really need to overwrite an already existing world, which in that specific case, should be after you've quit the world and don't need the current version of it.

This is definitely a design oversight I made, so thank you for bringing it up to my attention!

@arexon arexon self-assigned this Nov 19, 2022
@arexon arexon added the bug Something isn't working label Nov 19, 2022
@arexon arexon changed the title Haze can break your world 'haze test` can overwrite an already existing world Nov 19, 2022
@arexon arexon changed the title 'haze test` can overwrite an already existing world haze test can overwrite an already existing world Nov 19, 2022
@Nusiq
Copy link
Author

Nusiq commented Nov 19, 2022

Overwriting worlds is useful. With that feature you can use haze for reloading the game to a specific state. This way you can be very destructive when you work on your map. It helps when you're testing things that break blocks (for example custom explosive weapon).

@arexon
Copy link
Member

arexon commented Nov 19, 2022

Yeah, that's actually a great use case that I've never thought about until now! Making overwriting disabled by default for haze test will just ensure users wouldn't destroy a world by accident. They could then enable it when they know what they're doing.

@arexon arexon changed the title haze test can overwrite an already existing world haze test can overwrite an already existing world by default Nov 19, 2022
@arexon
Copy link
Member

arexon commented Nov 19, 2022

Fixed with #2

@arexon arexon closed this as completed Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants