Looking for some information regarding connecting the Apollo FS to the #130 OSRS deob. Currently, the only thing that has been changed is the decoder.
Don't want to disable the update server, so would like to know how it works and what needs to be changed in order to make it compatible with the deob.
___________________________________________
One of the errors
Code:
java.io.FileNotFoundException: Could not find indexIndex: 255 Des: 255 Index shit: 96
at org.apollo.cache.IndexedFileSystem.getIndex(IndexedFileSystem.java:335)
at org.apollo.cache.IndexedFileSystem.getFile(IndexedFileSystem.java:183)
at org.apollo.net.update.OnDemandRequestWorker.service(OnDemandRequestWorker.java:44)
at org.apollo.net.update.OnDemandRequestWorker.service(OnDemandRequestWorker.java:1)
at org.apollo.net.update.RequestWorker.run(RequestWorker.java:70)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at
Code:
private Index getIndex(FileDescriptor descriptor) throws IOException {
int index = descriptor.getType();
Preconditions.checkElementIndex(index, indices.length, "File descriptor type out of bounds.");
byte[] buffer = new byte[FileSystemConstants.INDEX_SIZE];
RandomAccessFile indexFile = indices[index];
System.out.println("Index: " + index + " " + "Des: " + descriptor.getFile());
synchronized (indexFile) {
long position = descriptor.getFile() * FileSystemConstants.INDEX_SIZE;
System.out.println(descriptor.getFile());
System.out.println(position);
System.out.println(position + FileSystemConstants.INDEX_SIZE);
System.out.println(indexFile.length());
if (position >= 0 && indexFile.length() >= position + FileSystemConstants.INDEX_SIZE) {
indexFile.seek(position);
indexFile.readFully(buffer);
} else {
throw new FileNotFoundException("Could not find index" + "Index: " + index + " " + "Des: " + descriptor.getFile() + " " + "Index shit: " + indexFile.length());
}
}
return Index.decode(buffer);
}