This commit is contained in:
Anuken
2019-12-08 21:29:03 -05:00
parent e06d61dcc9
commit 2554433f8d
2 changed files with 23 additions and 14 deletions
@@ -173,7 +173,10 @@ public class ContentParser{
} }
}else{ }else{
//TODO generate dynamically instead of doing.. this //TODO generate dynamically instead of doing.. this
Class<? extends Block> type = resolve(getType(value), Class<? extends Block> type;
try{
type = resolve(getType(value),
"io.anuke.mindustry.world", "io.anuke.mindustry.world",
"io.anuke.mindustry.world.blocks", "io.anuke.mindustry.world.blocks",
"io.anuke.mindustry.world.blocks.defense", "io.anuke.mindustry.world.blocks.defense",
@@ -187,6 +190,9 @@ public class ContentParser{
"io.anuke.mindustry.world.blocks.storage", "io.anuke.mindustry.world.blocks.storage",
"io.anuke.mindustry.world.blocks.units" "io.anuke.mindustry.world.blocks.units"
); );
}catch(IllegalArgumentException e){
type = Block.class;
}
block = make(type, mod + "-" + name); block = make(type, mod + "-" + name);
} }
@@ -107,6 +107,9 @@ public class DesktopLauncher extends ClientLauncher{
if(SteamAPI.restartAppIfNecessary(SVars.steamID)){ if(SteamAPI.restartAppIfNecessary(SVars.steamID)){
System.exit(0); System.exit(0);
} }
}catch(NullPointerException ignored){
steam = false;
Log.info("Running in offline mode.");
}catch(Throwable e){ }catch(Throwable e){
steam = false; steam = false;
Log.err("Failed to load Steam native libraries."); Log.err("Failed to load Steam native libraries.");