-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
60 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package me.virb3.mcmouser; | ||
|
||
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import java.io.File; | ||
import java.io.InputStream; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.nio.file.StandardCopyOption; | ||
import java.util.Locale; | ||
|
||
public class CoreMod implements PreLaunchEntrypoint { | ||
private static final Logger LOGGER = LogManager.getLogger(); | ||
|
||
@Override | ||
public void onPreLaunch() { | ||
if (!System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("mac")) { | ||
LOGGER.info("Not running on macOS, disabling"); | ||
return; | ||
} | ||
try { | ||
File tempDir = Files.createTempDirectory("mcmouser").toFile(); | ||
tempDir.deleteOnExit(); | ||
Path tempFile = tempDir.toPath().resolve("liblwjgl.dylib"); | ||
try (InputStream is = CoreMod.class.getResourceAsStream("/liblwjgl.dylib")) { | ||
Files.copy(is, tempFile, StandardCopyOption.REPLACE_EXISTING); | ||
} | ||
System.setProperty("org.lwjgl.librarypath", tempDir.getAbsolutePath()); | ||
LOGGER.info("Everything loaded"); | ||
} catch (Exception e) { | ||
LOGGER.error("Failed to load patched liblwjgl.dylib, throwing exception"); | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/main/java/me/virb3/mcmouser/client/McMouserClient.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
src/main/java/me/virb3/mcmouser/client/mixin/MixinMouse.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.