Skip to content

Commit

Permalink
Fixed crash when running in non-dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Jan 1, 2023
1 parent 5c7f9db commit 38f2278
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.llamalad7.mixinextras.MixinExtrasBootstrap;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;
import net.raphimc.immediatelyfast.feature.core.ImmediatelyFastConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -16,7 +14,7 @@
import java.lang.reflect.Field;
import java.nio.file.Files;

public class ImmediatelyFast implements ClientModInitializer, PreLaunchEntrypoint {
public class ImmediatelyFast implements ClientModInitializer {

public static final Logger LOGGER = LoggerFactory.getLogger("ImmediatelyFast");
public static final Unsafe UNSAFE = getUnsafe();
Expand All @@ -30,11 +28,6 @@ public void onInitializeClient() {
//System.load("C:\\Program Files\\RenderDoc\\renderdoc.dll");
}

@Override
public void onPreLaunch() {
MixinExtrasBootstrap.init();
}

public static void loadConfig() {
final File configFile = FabricLoader.getInstance().getConfigDir().resolve("immediatelyfast.json").toFile();
if (configFile.exists()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package net.raphimc.immediatelyfast;

import com.llamalad7.mixinextras.MixinExtrasBootstrap;
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;

public class ImmediatelyFastPreLaunch implements PreLaunchEntrypoint {

@Override
public void onPreLaunch() {
MixinExtrasBootstrap.init();
}

}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"net.raphimc.immediatelyfast.ImmediatelyFast"
],
"preLaunch": [
"net.raphimc.immediatelyfast.ImmediatelyFast"
"net.raphimc.immediatelyfast.ImmediatelyFastPreLaunch"
]
},
"accessWidener": "immediatelyfast.accesswidener",
Expand Down

0 comments on commit 38f2278

Please sign in to comment.