finished the creation of nbt in player.rs I will refactor level.rs to use a struct and update its fields

This commit is contained in:
2025-08-19 22:19:57 +02:00
parent 5193283c70
commit a9dfdf74af
4 changed files with 250 additions and 3 deletions

View File

@@ -3,7 +3,6 @@ use std::fs::File;
use nbt::{Tag, write_nbt};
pub fn create_nbt(
name: String,
seed: i64,
is_hardcore: bool,
structures: bool,
@@ -24,7 +23,7 @@ pub fn create_nbt(
level_name: String,
path: String,
) -> std::io::Result<()> {
let mut root = Tag::new_compound(name);
let mut root = Tag::new_compound("Data");
root.insert("RandomSeed".to_string(), Tag::new_long("RandomSeed", seed));
root.insert(
"hardcore".to_string(),