mirror of
https://github.com/Chaoscaot/schemsearch.git
synced 2026-06-15 16:26:03 +02:00
Refactor NBT parsing logic and correct block data handling in read_blocks. Match schema changes and improve error handling across version loaders.
This commit is contained in:
@@ -49,7 +49,7 @@ pub async unsafe fn get_connection() {
|
||||
pub async fn load_all_schematics(filter: SchematicFilter) -> Vec<SchematicNode> {
|
||||
unsafe { get_connection().await; }
|
||||
let mut schematics = Vec::new();
|
||||
let rows = unsafe { &CONN }.lock().unwrap().as_mut().unwrap().fetch_all(format!("SELECT SN.NodeId, SN.NodeName FROM NodeData ND INNER JOIN SchematicNode SN ON SN.NodeId = ND.NodeId WHERE NodeFormat = true {}", filter.build()).as_str()).await.expect("Failed to fetch schematics");
|
||||
let rows = unsafe { &CONN }.lock().unwrap().as_mut().unwrap().fetch_all(format!("SELECT SN.NodeId, SN.NodeName FROM NodeData ND INNER JOIN SchematicNode SN ON SN.NodeId = ND.NodeId WHERE NodeFormat >= 2 {}", filter.build()).as_str()).await.expect("Failed to fetch schematics");
|
||||
for row in rows {
|
||||
schematics.push(SchematicNode {
|
||||
id: row.get(0),
|
||||
|
||||
Reference in New Issue
Block a user