Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
ModelMap.load(load + "models");
public static void load(String s) {
res = s;
File f = new File(s);
LoadModel thread = new LoadModel(f);
thread.setDaemon(true);
thread.setName("Load Models thread");
thread.start();
}
@Override
public void run() {
try {
for (File file : this.fileDouble.listFiles()) {
String name = file.getName();
if (!name.endsWith(".sss"))
continue;
name = name.substring(0, name.length() - 4);
this.modelFile = new File(res + File.separator + name + ".sss");
FileInputStream is = new FileInputStream(this.modelFile);
byte[] bytes = IOUtils.toByteArray((InputStream) is);
...
}
} catch (Exception e) {
e.printStackTrace();
}
}
List<String> result = null;
try (Stream<Path> walk = Files.walk(Paths.get(load + "models"))) {
result = walk.filter(Files::isDirectory).map(x -> x.toString()).collect(Collectors.toList());
} catch (IOException ioe) {
ioe.printStackTrace();
}
for(int i = 0; i < result.size(); i++) {
ModelMap.load("" + result.get(i));
}
try (Stream<Path> walk = Files.walk(Paths.get(load + "models").resolve(load + "models"))) {resolve
[22:13:52] [Client thread/INFO] [STDOUT]: [corejz.b.proxy.ClientProxy:preInit:77]: [C:\b\eclipse\res\models, C:\b\eclipse\res\models\deco, C:\b\eclipse\res\models\items, C:\b\eclipse\res\models\vehicle]
[22:13:52] [Load Models thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.io.FileNotFoundException: C:\b\eclipse\res\models\vehicle\armor.sss (Не удается найти указанный файл)
[22:13:52] [Load Models thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.io.FileInputStream.open0(Native Method)
[22:13:52] [Load Models thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.io.FileInputStream.open(Unknown Source)
[22:13:52] [Load Models thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.io.FileInputStream.<init>(Unknown Source)
[22:13:52] [Load Models thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at corejz.b.loader.model.ModelMap$LoadModel.run(ModelMap.java:77)