Skip to content

Commit

Permalink
Switch mainProject to 1.20.2
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrix-Shen <HendrixShen@hendrixshen.top>
  • Loading branch information
Hendrix-Shen committed Oct 17, 2023
1 parent e036910 commit bcc6904
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
4 changes: 1 addition & 3 deletions README.md
Expand Up @@ -19,8 +19,6 @@ English | [中文](./README_ZH_CN.md)

❗Before reporting a problem, be sure to try the latest [beta version](https://github.com/Hendrix-Shen/MagicLib/releases) to check if the problem still exists.

♻️Note: Minecraft 1.20 requires the use of a third-party port [Malilib](https://github.com/Nyan-Work/malilib/releases/tag/snapshot-1.20.2).

## Description

A library of versatile mod dependencies.
Expand Down Expand Up @@ -58,7 +56,7 @@ We have added a complete dependency checking system to verify dependency availab

### Support

Current main development for Minecraft version: 1.20.1
Current main development for Minecraft version: 1.20.2

And use `preprocess` to be compatible with all versions.

Expand Down
4 changes: 1 addition & 3 deletions README_ZH_CN.md
Expand Up @@ -19,8 +19,6 @@

❗在报告问题前,请务必尝试最新[测试版](https://github.com/Hendrix-Shen/MagicLib/releases),检查问题是否依然存在。

♻注意: Minecraft 1.20 需要使用第三方的 [Malilib](https://github.com/Nyan-Work/malilib/releases/tag/snapshot-1.20.2)

## 描述

一个多功能的模组依赖库。
Expand Down Expand Up @@ -58,7 +56,7 @@

### 支持

当前主开发版本:1.20.1
当前主开发版本:1.20.2

并且使用 `预处理` 来兼容各版本。

Expand Down
Expand Up @@ -62,9 +62,9 @@ public MagicLanguageResourceManager() {
ResourceLocation resourceLocation = new ResourceLocation(namespace, languagePath);
Resource resource = new MagicLanguageResource(
//#if MC > 12001
//$$ new FilePackResources.FileResourcesSupplier(new File(resourceUrl.getPath()), true).openPrimary(namespace),
new FilePackResources.FileResourcesSupplier(new File(resourceUrl.getPath()), true).openPrimary(namespace),
//#elseif MC > 11902
new FilePackResources(namespace, new File(resourceUrl.getPath()), true),
//$$ new FilePackResources(namespace, new File(resourceUrl.getPath()), true),
//#else
//$$ namespace,
//#endif
Expand Down Expand Up @@ -106,9 +106,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {

Resource resource = new MagicLanguageResource(
//#if MC > 12001
//$$ new FilePackResources.FileResourcesSupplier(file, true).openPrimary(namespace),
new FilePackResources.FileResourcesSupplier(file, true).openPrimary(namespace),
//#elseif MC > 11902
new FilePackResources(namespace, file.toFile(), true),
//$$ new FilePackResources(namespace, file.toFile(), true),
//#else
//$$ namespace,
//#endif
Expand Down
Expand Up @@ -23,7 +23,7 @@
import java.util.Map;

//#if MC > 11201
//$$ import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.Unique;
//#endif

@Environment(EnvType.CLIENT)
Expand All @@ -37,13 +37,13 @@ public class MixinLanguageManager {
private Map<String, LanguageInfo> languages;

//#if MC > 12001
//$$ @Unique
//$$ private static final String magiclib$DEFAULT_LANGUAGE = "en_us";
@Unique
private static final String magiclib$DEFAULT_LANGUAGE = "en_us";
//#else
@Shadow
@Final
//$$ @Shadow
//$$ @Final
//#if MC > 11903
public static String DEFAULT_LANGUAGE_CODE;
//$$ public static String DEFAULT_LANGUAGE_CODE;
//#else
//$$ private static LanguageInfo DEFAULT_LANGUAGE;
//#endif
Expand Down Expand Up @@ -126,9 +126,9 @@ private void postSetSelected(
if (languageInfoList.isEmpty()) {
languageInfoList.add(
//#if MC > 12001
//$$ magiclib$DEFAULT_LANGUAGE
magiclib$DEFAULT_LANGUAGE
//#elseif MC > 11903
DEFAULT_LANGUAGE_CODE
//$$ DEFAULT_LANGUAGE_CODE
//#else
//$$ DEFAULT_LANGUAGE
//#endif
Expand Down
2 changes: 1 addition & 1 deletion versions/mainProject
@@ -1 +1 @@
1.20.1
1.20.2

0 comments on commit bcc6904

Please sign in to comment.