Skip to content

Commit

Permalink
adapt to new nbtx lib #7 (final, I hope)
Browse files Browse the repository at this point in the history
  • Loading branch information
theaddonn committed Sep 15, 2024
1 parent 308aec5 commit 905e378
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
22 changes: 11 additions & 11 deletions crates/world/src/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ impl World {
// - in the levelname.txt file
// - as a field in the level.dat file (world/level.dat and world/level.dat_old)

Ok(World {
// Read the LevelDB database (in world/db/*)
db: match WorldDB::open(&PathBuf::from(&directory)) {
Ok(v) => v,
Err(e) => {
return Err(WorldError::DBError(e));
}
},
level_dat,
format_version: 2,
})
// Ok(World {
// // Read the LevelDB database (in world/db/*)
// db: match WorldDB::open(&PathBuf::from(&directory)) {
// Ok(v) => v,
// Err(e) => {
// return Err(WorldError::DBError(e));
// }
// },
// level_dat,
// format_version: 2,
// })
}
}
1 change: 0 additions & 1 deletion crates/world/src/world_db/world_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ impl WorldDB {
match self.db.get(READ_OPTIONS, str.as_bytes()) {
Ok(maybe_bytes) => match maybe_bytes {
Some(bytes) => {
let u8_bytes = bytes.get().into();
todo!("Fix this mess")
// match NbtTag::nbt_deserialize_vec::<NbtLittleEndian>(&u8_bytes) {
// Ok((_, tag)) => match tag {
Expand Down

0 comments on commit 905e378

Please sign in to comment.