Support offline installation of OptiFine 1.17.1 H1 and later
This commit is contained in:
@@ -229,6 +229,7 @@ public final class OptiFineInstallTask extends Task<Version> {
|
|||||||
try (FileSystem fs = CompressingUtils.createReadOnlyZipFileSystem(installer)) {
|
try (FileSystem fs = CompressingUtils.createReadOnlyZipFileSystem(installer)) {
|
||||||
Path configClass = fs.getPath("Config.class");
|
Path configClass = fs.getPath("Config.class");
|
||||||
if (!Files.exists(configClass)) configClass = fs.getPath("net/optifine/Config.class");
|
if (!Files.exists(configClass)) configClass = fs.getPath("net/optifine/Config.class");
|
||||||
|
if (!Files.exists(configClass)) configClass = fs.getPath("notch/net/optifine/Config.class");
|
||||||
if (!Files.exists(configClass)) throw new IOException("Unrecognized installer");
|
if (!Files.exists(configClass)) throw new IOException("Unrecognized installer");
|
||||||
ConstantPool pool = ConstantPoolScanner.parse(Files.readAllBytes(configClass), ConstantType.UTF8);
|
ConstantPool pool = ConstantPoolScanner.parse(Files.readAllBytes(configClass), ConstantType.UTF8);
|
||||||
List<String> constants = new ArrayList<>();
|
List<String> constants = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user