Superflat: keep an empty layer list on Re-Create
FlatSettings::from_tag rejected layers: [], so a world with every layer removed fell back to the classic bedrock/dirt/grass settings when re-created. An empty saved list is a valid void flat generator; a non-empty list whose entries all fail to parse is still rejected. Co-Authored-By: ZCode Agent <noreply@zcode.ai>
This commit is contained in:
@@ -91,7 +91,9 @@ impl FlatSettings {
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
if layers.is_empty() {
|
||||
// `layers: []` is a valid void flat world; a list whose entries all
|
||||
// fail to parse is not.
|
||||
if layers.is_empty() && !list.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let flag = |key: &str, default: bool| {
|
||||
|
||||
Reference in New Issue
Block a user