Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fc40686
Update plugin dev.architectury.loom to 1.14-SNAPSHOT
Hendrix-Shen Mar 30, 2026
dc75c2a
Update dependency com.replaymod.preprocess to c5abb4f (fallen's fork)
Hendrix-Shen Mar 30, 2026
7319f7a
Move common build scripts to build-logic
Hendrix-Shen Apr 30, 2026
a2b9018
Merge branch 'dev/0.8' into feat/mc-26.1
Hendrix-Shen Apr 30, 2026
ab19763
Fix mismatch plugin ID with VersionCatalog
Hendrix-Shen Apr 30, 2026
52b3a40
Fix project name regex & Auto create project dir
Hendrix-Shen May 2, 2026
2b9401f
Update dependency com.replaymod.preprocess to 4c38783 (fallen's fork)
Hendrix-Shen May 2, 2026
36e20ae
Make build logic compatible with 26.1+
Hendrix-Shen May 2, 2026
a40a40b
Switch to essential-loom (SparkUniverse's fork)
Hendrix-Shen May 2, 2026
9e3b75a
magiclib-better-dev 26.1.2
Hendrix-Shen May 2, 2026
aae620d
magiclib-minecraft-api 26.1.2
Hendrix-Shen May 3, 2026
6c3616d
magiclib-malilib-extra 26.1.2
Hendrix-Shen May 4, 2026
de24431
magiclib-legacy-compat 26.1.2
Hendrix-Shen May 5, 2026
318a5f6
Reformat code
Hendrix-Shen May 7, 2026
248738e
Remove useless properties
Hendrix-Shen May 8, 2026
cb7cfe4
Update dependencies:modloader to latest
Hendrix-Shen May 10, 2026
d5670da
Update mod dependency fabric-api to latest
Hendrix-Shen May 10, 2026
8a21005
Update mod dependency modmenu to latest
Hendrix-Shen May 10, 2026
e2dd9d5
Update mod dependency malilib to latest
Hendrix-Shen May 10, 2026
7c9c507
Update mod dependency mafglib to latest
Hendrix-Shen May 10, 2026
55f3981
Update mod dependency in-game-account-switcher to latest
Hendrix-Shen May 10, 2026
80fdebd
Fix fabric-api version mistake
Hendrix-Shen May 10, 2026
bdd6f55
Update mod dependency imblocker-original to latest
Hendrix-Shen May 10, 2026
ca58c09
Update README
Hendrix-Shen May 10, 2026
c5e3661
Update .gitignore
Hendrix-Shen May 10, 2026
f1eb644
Update dependency org.apache.groovy:groovy-toml to v5.0.6
renovate[bot] May 7, 2026
b3db544
Update dependency org.apache.logging.log4j:log4j-api to v2.26.0
renovate[bot] May 7, 2026
f71b14d
Update Gradle to v9.5.1
renovate[bot] May 13, 2026
d4d9119
Remove useless mapping files
Hendrix-Shen May 13, 2026
9d22ccf
Now, we're on Java 25
Hendrix-Shen May 13, 2026
34f365d
Update dependencies:modloader to latest
Hendrix-Shen May 14, 2026
4280951
Update mod dependency fabric-api to latest
Hendrix-Shen May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
java-version: 25
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ bin/
.classpath
.project

# fabric
# macos

run/
*.DS_Store

# fabric
publish/

run/
local.properties
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Current main development for Minecraft version: 1.16.5

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

**Note: I only accept the following versions of issues. Please note that this information is time-sensitive and any version of the issue not listed here will be closed**
**Note: We only accept the following versions of issues. Please note that this information is time-sensitive and any version of the issue not listed here will be closed**

- Minecraft 1.14.4
- Minecraft 1.15.2
Expand All @@ -59,15 +59,30 @@ And use `preprocess` to be compatible with all versions.
- Minecraft 1.21.8
- Minecraft 1.21.10
- Minecraft 1.21.11
- Minecraft 26.1.2

### Mappings

We are using the **Mojang official** mappings to de-obfuscate Minecraft and insert patches.
For Minecraft 1.14 - 1.21.11, we are using the **Mojang official** mappings to de-obfuscate Minecraft and insert patches.

### Document

The English doc and the Chinese doc are aligned line by line.

## Disclaimer

The use of this open-source mod dependency library is entirely at the user's own discretion. Any risks, losses, or consequences that may arise during the use of resources shall be solely borne by the user. We shall not be held responsible for any direct or indirect losses resulting from the use of this project.

We solemnly commit that during the use of this project, we will not collect, store, transmit, or upload any personal information, usage data, or other sensitive information of users in any form. All data processing is completed locally to ensure the maximum protection of user privacy security.

For any forks, modified versions, or distributions created by third parties based on this project or distributed through other channels, we do not provide any form of warranty, support, or maintenance services. Users should independently assess the relevant risks when using such third-party versions. The official releases we provide are strictly compiled from the open-source code to generate binary files. During this process, only placeholders and other technical means will be used to replace necessary information such as version numbers at compile time to ensure correct project identification and tracking. No substantive modifications will be made to the source code beyond this.

At the same time, we need to clearly inform users that we cannot guarantee the complete fix of all known or unknown security vulnerabilities, nor can we promise to respond promptly to all feature requests or provide regular updates. Project maintenance and updates will be arranged according to project development status and resource availability. Users should understand this characteristic of open-source projects and make reasonable usage decisions accordingly.

It should be particularly noted that this project repository has no affiliation, authorization, sponsorship, or cooperative relationship with Mojang Studios, Microsoft, and their related products, services, or trademarks. This project is a completely independent open-source project.

If you do not accept any of the above terms and disclaimers, please do not use, install, introduce, or integrate this dependency library into any of your projects, and please immediately delete any related copies stored on your devices or systems, and cease all usage activities.

## License

This project is available under the LGPLv3 license. Feel free to learn from it and incorporate it in your own projects.
This project is available under the LGPL-3.0 license. Feel free to learn from it and incorporate it in your own projects.
21 changes: 18 additions & 3 deletions README_ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

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

**注意: 我仅接受以下版本的议题。请注意该信息的时效性,任何不在此列出的版本议题均会被关闭。**
**注意: 我们仅接受以下版本的议题。请注意该信息的时效性,任何不在此列出的版本议题均会被关闭。**

- Minecraft 1.14.4
- Minecraft 1.15.2
Expand All @@ -59,15 +59,30 @@
- Minecraft 1.21.8
- Minecraft 1.21.10
- Minecraft 1.21.11
- Minecraft 26.1.2

### 混淆映射表

我们使用 **Mojang 官方** 混淆映射表来反混淆 Minecraft 并插入补丁程序。
对于 Minecraft 1.14 - 1.21.11,我们使用 **Mojang 官方** 混淆映射表来反混淆 Minecraft 并插入补丁程序。

### 文档

英文文档与中文文档是逐行对应的。

## 免责声明

本开源模组依赖库的使用完全基于使用者的自主决定,所有资源使用过程中可能产生的任何风险、损失或后果均由使用者自行承担,我们不对因使用本项目而导致的任何直接或间接损失负责。

我们郑重承诺,在本项目的使用过程中,我们不会以任何形式收集、存储、传输或上传使用者的任何个人信息、使用数据或其他敏感信息,所有数据处理均在本地完成,确保使用者的隐私安全得到最大程度的保护。

对于任何第三方基于本项目创建的分支、修改版本或通过其他渠道进行的分发,我们不提供任何形式的保证、支持或维护服务,使用者在使用此类第三方版本时应自行评估相关风险。我们提供的官方发行版严格基于开源代码原样编译生成二进制文件,在此过程中仅会通过占位符等技术手段在编译时替换版本号等必要信息,以确保项目的正确标识和追踪,除此之外不会对源代码进行任何实质性修改。

同时,我们需要明确告知使用者,我们无法保证能够完全修复所有已知或未知的安全漏洞,也无法承诺及时响应所有功能请求或提供定期更新,项目的维护和更新将根据项目发展情况和资源可用性进行安排,使用者应理解开源项目的这一特性并据此做出合理的使用决策。

需要特别说明的是,本项目库与 Mojang Studios、Microsoft 及其相关产品、服务或商标没有任何关联、授权、赞助或合作关系,本项目为完全独立的开源项目。

若您不接受上述任何条款和免责声明,请不要使用、安装、引入或集成本依赖库到您的任何项目中,并请立即删除您设备或系统中已存储的任何相关副本,停止一切使用行为。

## 许可

此项目在 LGPLv3许可证 下可用。 从中学习,并将其融入到您自己的项目中。
此项目在 LGPL-3.0许可证 下可用。 从中学习,并将其融入到您自己的项目中。
27 changes: 18 additions & 9 deletions build-logic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ repositories {
url = "https://maven.hendrixshen.moe/mirror"
}

maven {
name = "Architectury"
url = "https://maven.architectury.dev"
}

maven {
name = "Jitpack"
url = "https://jitpack.io"
Expand All @@ -25,10 +20,14 @@ repositories {
dependencies {
implementation(gradleApi())
implementation(localGroovy())
implementation(libs.architectury.loom)
implementation(libs.preprocessor)
implementation(libs.replace.token)
implementation(libs.shadow)
compileOnly(libs.essential.loom)
compileOnly(libs.preprocessor)
compileOnly(libs.replace.token)
compileOnly(libs.shadow)
implementation(libs.gson)
implementation(libs.guava)
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
}

checkstyle {
Expand All @@ -52,5 +51,15 @@ gradlePlugin {
id = "top.hendrixshen.magiclib.build-logic.core-project"
implementationClass = "top.hendrixshen.magiclib.buildLogic.config.CoreProjectBuildLogic"
}

register("magic-loom") {
id = "top.hendrixshen.magiclib.build-logic.magic-loom"
implementationClass = "top.hendrixshen.magiclib.buildLogic.MagicLoomPlugin"
}

register("magic-loom-root") {
id = "top.hendrixshen.magiclib.build-logic.magic-loom-root"
implementationClass = "top.hendrixshen.magiclib.buildLogic.RootMagicLoomPlugin"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomExtension.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomExtension.java#L1

Package name contains upper case characters

import org.gradle.api.Project;
import org.gradle.api.provider.Property;

import top.hendrixshen.magiclib.buildLogic.util.ProjectDetail;

public interface MagicLoomExtension {
static MagicLoomExtension get(Project project) {
return (MagicLoomExtension) project.getExtensions().getByName("magic");
}

Property<ProjectDetail> getProjectDetail();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomExtensionImpl.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomExtensionImpl.java#L1

Package name contains upper case characters

import lombok.Getter;
import org.gradle.api.GradleException;
import org.gradle.api.Project;

import org.gradle.api.provider.Property;

import top.hendrixshen.magiclib.buildLogic.util.ProjectDetail;

@Getter
public abstract class MagicLoomExtensionImpl implements MagicLoomExtension {
private final Property<ProjectDetail> projectDetail;

public MagicLoomExtensionImpl(Project project) {
Project parentProject = project.getParent();
assert parentProject != null;
RootMagicLoomExtension rootMagicLoomExtension = parentProject.getExtensions().getByType(RootMagicLoomExtension.class);
ProjectDetail detail = rootMagicLoomExtension.getProjectDetailMap().get().get(project.getName());

if (detail == null) {
throw new GradleException("Project " + project.getName() + " is not registered in root project " + parentProject.getName());
}

this.projectDetail = project.getObjects().property(ProjectDetail.class).convention(detail);
this.projectDetail.finalizeValue();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomPlugin.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/MagicLoomPlugin.java#L1

Package name contains upper case characters

import org.gradle.api.GradleException;
import org.gradle.api.Plugin;
import org.gradle.api.Project;

import top.hendrixshen.magiclib.buildLogic.configuration.MagicLoomConfigurations;
import top.hendrixshen.magiclib.buildLogic.configuration.Preprocessor;

import java.util.List;

public class MagicLoomPlugin implements Plugin<Project> {
public static final String NAME = "top.hendrixshen.magiclib.build-logic.magic-loom";

private static final List<Class<? extends Runnable>> SETUP_JOBS = List.of(
MagicLoomConfigurations.class,
Preprocessor.class
);

@Override
public void apply(Project project) {
Project parentProject = project.getParent();

if (parentProject == null) {
throw new GradleException(MagicLoomPlugin.NAME + "couldn't apply on root project!");
}

if (!parentProject.getPlugins().hasPlugin(RootMagicLoomPlugin.NAME)) {
throw new GradleException("Apply" + RootMagicLoomPlugin.NAME + " on parent project first!");
}

project.getExtensions().create(MagicLoomExtension.class, "magic", MagicLoomExtensionImpl.class, project);

for (Class<? extends Runnable> jobClass : SETUP_JOBS) {
project.getObjects().newInstance(jobClass).run();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomExtension.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomExtension.java#L1

Package name contains upper case characters

import org.gradle.api.Project;
import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property;

import top.hendrixshen.magiclib.buildLogic.RootMagicLoomExtensionImpl.ManualLinkDetail;
import top.hendrixshen.magiclib.buildLogic.util.ProjectDetail;

public interface RootMagicLoomExtension {
static RootMagicLoomExtension get(Project project) {
return (RootMagicLoomExtension) project.getExtensions().getByName("magic");
}

Property<Boolean> getMagiclibMode();

Property<Boolean> getMultiPlatformSupport();

MapProperty<String, ManualLinkDetail> getManualLinkMap();

MapProperty<String, ProjectDetail> getProjectDetailMap();

void manualLink(String projectName, ProjectDetail to, String mappingFileName);

void recordProjectDetail(String projectName, ProjectDetail detail);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomExtensionImpl.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomExtensionImpl.java#L1

Package name contains upper case characters

import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.gradle.api.Project;
import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property;

import top.hendrixshen.magiclib.buildLogic.util.ProjectDetail;

@Getter
public abstract class RootMagicLoomExtensionImpl implements RootMagicLoomExtension {
private final Property<Boolean> magiclibMode;
private final Property<Boolean> multiPlatformSupport;
private final MapProperty<String, ManualLinkDetail> manualLinkMap;
private final MapProperty<String, ProjectDetail> projectDetailMap;

public RootMagicLoomExtensionImpl(Project project) {
this.magiclibMode = project.getObjects().property(Boolean.class).convention(false);
this.magiclibMode.finalizeValueOnRead();
this.multiPlatformSupport = project.getObjects().property(Boolean.class).convention(false);
this.multiPlatformSupport.finalizeValueOnRead();
this.manualLinkMap = project.getObjects().mapProperty(String.class, ManualLinkDetail.class);
this.projectDetailMap = project.getObjects().mapProperty(String.class, ProjectDetail.class);
}

@Override
public void manualLink(String projectName, ProjectDetail to, String mappingFileName) {
this.manualLinkMap.put(projectName, new ManualLinkDetail(to, mappingFileName));
}

@Override
public void recordProjectDetail(String projectName, ProjectDetail detail) {
this.projectDetailMap.put(projectName, detail);
}

@SuppressWarnings("ClassCanBeRecord")
@Getter
@ToString
@EqualsAndHashCode
@AllArgsConstructor
public static class ManualLinkDetail {
private final ProjectDetail to;
private final String mappingFileName;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomPlugin.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/RootMagicLoomPlugin.java#L1

Package name contains upper case characters

import org.gradle.api.Plugin;
import org.gradle.api.Project;

import top.hendrixshen.magiclib.buildLogic.configuration.root.Preprocessor;

public class RootMagicLoomPlugin implements Plugin<Project> {
public static final String NAME = "top.hendrixshen.magiclib.build-logic.magic-loom-root";

@Override
public void apply(Project project) {
project.getExtensions().create(RootMagicLoomExtension.class, "magic", RootMagicLoomExtensionImpl.class, project);
project.getObjects().newInstance(Preprocessor.class).run();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package top.hendrixshen.magiclib.buildLogic;

Check notice on line 1 in build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/SharedConstants.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build-logic/src/main/java/top/hendrixshen/magiclib/buildLogic/SharedConstants.java#L1

Package name contains upper case characters

public class SharedConstants {
public static final String PLATFORM_PROPERTY = "loom.platform";

public static class Catalogs {
public static final String LIBS = "libs";
public static final String FORGES = "forges";
}

public static class MagicProperties {
}

public static class ConfigurationNames {
public static final String AUTO_API = "autoApi";
public static final String AUTO_COMPILE_ONLY = "autoCompileOnly";
public static final String AUTO_COMPILE_ONLY_API = "autoCompileOnlyApi";
public static final String AUTO_RUNTIME_ONLY = "autoRuntimeOnly";
public static final String AUTO_LOCAL_RUNTIME = "autoLocalRuntime";
public static final String AUTO_IMPLEMENTATION = "autoImplementation";
// Loom Remap Configurations
public static final String MOD_API = "modApi";
public static final String MOD_COMPILE_ONLY = "modCompileOnly";
public static final String MOD_COMPILE_ONLY_API = "modCompileOnlyApi";
public static final String MOD_RUNTIME_ONLY = "modRuntimeOnly";
public static final String MOD_LOCAL_RUNTIME = "modLocalRuntime";
public static final String MOD_IMPLEMENTATION = "modImplementation";
}

public static class CommonDependencies {
public static final String MINECRAFT_GROUP = "com.mojang";
public static final String MINECRAFT_NAME = "minecraft";
public static final String FORGE_GROUP = "net.minecraftforge";
public static final String FORGE_NAME = "forge";
public static final String NEO_FORGE_GROUP = "net.neoforged";
public static final String NEO_FORGE_NAME = "neoforge";
}
}
Loading