-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复mixin错误 say mixin精简
- Loading branch information
Showing
7 changed files
with
76 additions
and
265 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
37 changes: 37 additions & 0 deletions
37
fabric/src/main/java/cn/evole/mods/mcbot/util/MCVersion.java
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 cn.evole.mods.mcbot.util; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* MCVersion | ||
* | ||
* @author cnlimiter | ||
* @version 1.0 | ||
* @description 获取minecraft的版本 | ||
* @date 2024/3/2 23:23 | ||
*/ | ||
public class MCVersion { | ||
|
||
@NotNull | ||
public static String getMcVersion() { | ||
try { | ||
// Fabric | ||
return (String) Reflection.clazz("net.fabricmc.loader.impl.FabricLoaderImpl") | ||
.get("INSTANCE") | ||
.get("getGameProvider()") | ||
.get("getNormalizedGameVersion()").get(); | ||
} catch (Exception ignored) { | ||
|
||
} | ||
try { | ||
// Quilt | ||
return (String) Reflection.clazz("org.quiltmc.loader.impl.QuiltLoaderImpl") | ||
.get("INSTANCE") | ||
.get("getGameProvider()") | ||
.get("getNormalizedGameVersion()").get(); | ||
} catch (Exception ignored) { | ||
|
||
} | ||
return "1.16.5"; | ||
} | ||
} |
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
70 changes: 0 additions & 70 deletions
70
fabric/versions/1.18.2/src/main/java/cn/evole/mods/mcbot/init/mixins/MixinSystemCmd.java
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
fabric/versions/1.19.2/src/main/java/cn/evole/mods/mcbot/init/mixins/MixinSystemCmd.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.