Skip to content

Commit

Permalink
Support Minecraft 23w18a (MC 1.20 Snapshot)
Browse files Browse the repository at this point in the history
No longer support Minecraft 23w17a
  • Loading branch information
Hendrix-Shen committed May 7, 2023
1 parent 85c565a commit 530ec3a
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 30 deletions.
4 changes: 3 additions & 1 deletion common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ configurations {

// Module, Property prefix, Resolve condition, Transitive dependencies.
def apiDependencies = [
["maven.modrinth:carpet" , "carpet" , true , false],
["carpet:fabric-carpet" , "carpet" , true , false],
["curse.maven:malilib-303119" , "malilib", mcVersion < 12000, false],
["fi.dy.masa:malilib" , "malilib", mcVersion > 11904, false],
["maven.modrinth:modmenu" , "modmenu", true , false],
Expand Down Expand Up @@ -298,6 +298,8 @@ remapJar {
}

processResources {
outputs.upToDateWhen { false }

from("${rootDir}/LICENSE")

from("${rootDir}/icon.png") {
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Gradle properties
org.gradle.cache.cleanup=false
org.gradle.jvmargs=-Xmx6G
org.gradle.parallel=true

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/top/hendrixshen/magiclib/MagicLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.ModInitializer;
import top.hendrixshen.magiclib.dependency.api.annotation.Dependencies;
import top.hendrixshen.magiclib.dependency.api.annotation.Dependency;
import top.hendrixshen.magiclib.impl.carpet.CarpetEntrypoint;
import top.hendrixshen.magiclib.impl.config.ConfigEntrypoint;
import top.hendrixshen.magiclib.tool.mixin.MixinAuditExecutor;

public class MagicLib implements ModInitializer, ClientModInitializer {
//#if MC > 11903 && MC < 12000
@Dependencies(and = @Dependency(value = "malilib", versionPredicate = ">=0.15.4", optional = true))
//#endif
@Override
public void onInitializeClient() {
ConfigEntrypoint.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ public class MagicLibConfigs {
public static void init(@NotNull ConfigManager cm) {
openConfigGui.getKeybind().setCallback((keyAction, iKeybind) -> {
MagicLibConfigGui screen = MagicLibConfigGui.getInstance();
screen.setParentGui(Minecraft.getInstance().screen);
//#if MC > 11903 && MC < 12000
screen.setParent(Minecraft.getInstance().screen);
//#else
//$$ screen.setParentGui(Minecraft.getInstance().screen);
//#endif
Minecraft.getInstance().setScreen(screen);
return true;
});
Expand Down
4 changes: 2 additions & 2 deletions versions/1.14.4/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ minecraft_version=1.14.4
minecraft_dependency=1.14.x

# Required Libraries
# Carpet - 1.3.7+v200121
# Carpet - 1.3.7+v200127
# fabric-carpet-1.14.4-1.3.7+v200127.jar
carpet_version=1.3.7
carpet_version=1.14.4-1.3.7+v200127
# Fabric API 0.28.5+1.14
fabric_version=0.28.5+1.14
# Malilib - 0.10.0-dev.20+arne.2
Expand Down
2 changes: 1 addition & 1 deletion versions/1.15.2/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=1.15.x
# Required Libraries
# Carpet - 1.4.8+v200811
# fabric-carpet-1.15.2-1.4.8+v200811.jar
carpet_version=1.4.8
carpet_version=1.15.2-1.4.8+v200811
# Fabric API 0.28.5+1.15
fabric_version=0.28.5+1.15
# Malilib - 0.10.0-dev.21+arne.2
Expand Down
2 changes: 1 addition & 1 deletion versions/1.16.5/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=1.16.x
# Required Libraries
# Carpet - 1.4.44+v210714
# fabric-carpet-1.16.5-1.4.44+v210714.jar
carpet_version=1.4.44
carpet_version=1.16.5-1.4.44+v210714
# Fabric API 0.42.0+1.16
fabric_version=0.42.0+1.16
# Malilib - 0.10.0-dev.21+arne.8
Expand Down
2 changes: 1 addition & 1 deletion versions/1.17.1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=1.17.x
# Required Libraries
# Carpet - 1.4.57+v220119
# fabric-carpet-1.17.1-1.4.57+v220119.jar
carpet_version=1.4.57
carpet_version=1.17.1-1.4.57+v220119
# Fabric API 0.46.1+1.17
fabric_version=0.46.1+1.17
# Malilib - 0.10.0-dev.26
Expand Down
2 changes: 1 addition & 1 deletion versions/1.18.2/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=1.18.x
# Required Libraries
# Carpet - 1.4.69+v220331
# fabric-carpet-1.18.2-1.4.69+v220331.jar
carpet_version=1.4.69
carpet_version=1.18.2-1.4.69+v220331
# Fabric API 0.76.0+1.18.2
fabric_version=0.76.0+1.18.2
# Malilib - 0.12.1
Expand Down
2 changes: 1 addition & 1 deletion versions/1.19.2/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=>1.18.2 <=1.19.2
# Required Libraries
# Carpet - 1.4.84+v221018
# fabric-carpet-1.19.2-1.4.84+v221018.jar
carpet_version=1.4.84
carpet_version=1.19.2-1.4.84+v221018
# Fabric API 0.76.0+1.19.2
fabric_version=0.76.0+1.19.2
# Malilib - 0.13.0
Expand Down
2 changes: 1 addition & 1 deletion versions/1.19.3/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_dependency=1.19.3
# Required Libraries
# Carpet - 1.4.96+v230201
# fabric-carpet-1.19.3-1.4.96+v230201.jar
carpet_version=1.4.96
carpet_version=1.19.3-1.4.96+v230201
# Fabric API 0.76.1+1.19.3
fabric_version=0.76.1+1.19.3
# Malilib - 0.14.0
Expand Down
16 changes: 8 additions & 8 deletions versions/1.19.4/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ minecraft_dependency=1.19.4

# Required Libraries
# Carpet - 1.4.101+v230319
# fabric-carpet-1.19.4-1.4.101+4446319.jar
carpet_version=1.4.101
# Fabric API 0.78.0+1.19.4
fabric_version=0.78.0+1.19.4
# Malilib - 0.15.2
# https://www.curseforge.com/minecraft/mc-mods/malilib/files/4444338
# malilib-fabric-1.19.4-0.15.2.jar
malilib_version=4444338
# fabric-carpet-1.19.4-1.4.101+v230319.jar
carpet_version=1.19.4-1.4.101+v230319
# Fabric API 0.80.0+1.19.4
fabric_version=0.80.0+1.19.4
# Malilib - 0.15.4
# https://www.curseforge.com/minecraft/mc-mods/malilib/files/4519977
# malilib-fabric-1.19.4-0.15.4.jar
malilib_version=4519977
# Mod Menu - 6.2.1
# modmenu-6.2.1.jar
modmenu_version=6.2.1
Expand Down
25 changes: 13 additions & 12 deletions versions/1.20/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Independent branch configuration
# Development Environment
minecraft_version=23w17a
minecraft_dependency=1.20-alpha.23.17.a
minecraft_version=23w18a
minecraft_dependency=1.20-alpha.23.18.a

# Required Libraries
# Carpet - 1.4.106+v230426
# fabric-carpet-23w17a-1.4.106+v230426.jar
carpet_version=1.4.106
# Fabric API 0.79.2+1.20
fabric_version=0.79.2+1.20
# Carpet - 1.4.107+v230503
# fabric-carpet-23w18a-1.4.107+v230503.jar
carpet_version=23w18a-1.4.107+v230503
# Fabric API 0.80.1+1.20
fabric_version=0.80.1+1.20
# Malilib - 23w17a-0.16.0
#
# malilib-23w17a-0.16.0.jar
malilib_version=23w17a-0.16.0
# Mod Menu - 7.0.0-beta.1
# modmenu-7.0.0-beta.1.jar
modmenu_version=7.0.0-beta.1
# malilib-23w18a-0.16.0.jar
malilib_version=23w18a-0.16.0
# Mod Menu - 7.0.0-beta.2
# modmenu-7.0.0-beta.2.jar
modmenu_version=7.0.0-beta.2

# Runtime Libraries - Only for development environment
# In-Game Account Switcher
# TODO
#
inGameAccountSwitcher_version=0
# LazyDFU 0.1.3
# https://www.curseforge.com/minecraft/mc-mods/lazydfu/files/3821870
Expand Down

0 comments on commit 530ec3a

Please sign in to comment.