Schematic reading simplification

This commit is contained in:
Anuken
2026-09-13 09:50:52 -04:00
parent 57221d4a9f
commit 9c7b0981a6
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -590,7 +590,7 @@ public class Schematics implements Loadable{
ContentMapper mapper = null;
//set up content mapping if found; this should not fail
//set up content mapping if found
if(map.containsKey("contentMap")){
IntMap<ObjectIntMap<String>> nameMap = JsonIO.json.fromJson(IntMap.class, ObjectIntMap.class, map.get("contentMap", "{}"));
IntMap<IntMap<Content>> contentMap = new IntMap<>();
@@ -604,12 +604,7 @@ public class Schematics implements Loadable{
mapper = (type, id) -> contentMap.get(type.ordinal(), IntMap::new).get(id);
}
String[] labels = null;
//try to read the categories, but skip if it fails
try{
labels = JsonIO.read(String[].class, map.get("labels", "[]"));
}catch(Exception ignored){}
String[] labels = Jval.read(map.get("labels", "[]")).asStringArray();
IntMap<Block> blocks = new IntMap<>();
int length = stream.readUnsignedByte();
+1 -1
View File
@@ -26,4 +26,4 @@ org.gradle.caching=true
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
android.enableR8.fullMode=false
archash=87a19404dd
archash=b63432df12