Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ebfef1a
初始化工具库工程
QiuYe-QAQ Nov 23, 2026
893fa76
迁入集合与缓存
QiuYe-QAQ Nov 23, 2026
8bd66ac
接入维度调度与异步存档
QiuYe-QAQ Nov 23, 2026
ff7f978
UpData
QiuYe-QAQ Nov 23, 2026
a188112
声明集合依赖与统一 Mixin 元数据
QiuYe-QAQ Nov 23, 2026
a675cf9
迁入客户端效果和双端入口工具
QiuYe-QAQ Nov 23, 2026
3ccc4b4
整理客户端按键同步入口
QiuYe-QAQ Nov 23, 2026
2fcd63a
扩展集合操作与任务调度工具
QiuYe-QAQ Nov 23, 2026
5f3d818
迁入物品流体与库存操作
QiuYe-QAQ Nov 23, 2026
ff2d29d
迁入世界操作与基础工具
QiuYe-QAQ Nov 23, 2026
487171a
迁入客户端模型与区段几何工具
QiuYe-QAQ Nov 23, 2026
3158e66
接入组合键配置与屏幕监听
QiuYe-QAQ Nov 23, 2026
886fec8
修正缓存映射查询并迁入生成脚本
QiuYe-QAQ Nov 23, 2026
3785fec
修正自定义哈希容器的空值等价键
QiuYe-QAQ Nov 24, 2026
7777bdc
补齐菜单流体容器批量交互
QiuYe-QAQ Nov 24, 2026
233b04d
迁入方块局部方向与点击分区
QiuYe-QAQ Nov 24, 2026
67ef5b8
补齐已加载区段采集和缓存作废
QiuYe-QAQ Nov 24, 2026
a06db7c
迁入客户端模型组合和连接纹理
QiuYe-QAQ Nov 24, 2026
df43163
接入动态贴图和图片分块组装
QiuYe-QAQ Nov 24, 2026
ef112bb
迁入通用图路由与补充集合编解码
QiuYe-QAQ Nov 24, 2026
f491f7c
补充资源包和提示文本工具
QiuYe-QAQ Nov 24, 2026
361e66c
补充周期脉冲并整理客户端效果端侧标记
QiuYe-QAQ Nov 24, 2026
cc77ee4
用 Lombok 生成已有构造器和访问器
QiuYe-QAQ Nov 24, 2026
268fc2d
反序列化后重建缓存哈希
QiuYe-QAQ Nov 24, 2026
34b2460
用数组克隆复制多维数组
QiuYe-QAQ Nov 24, 2026
4817369
按 OpenGL 版本选择环形反馈渲染
QiuYe-QAQ Nov 24, 2026
00d4f30
让体素采集访问器在双端生效
QiuYe-QAQ Nov 24, 2026
55efee0
UpData
QiuYe-QAQ Nov 24, 2026
b334d17
归并文件读写与内容摘要工具
QiuYe-QAQ Nov 24, 2026
981c1d9
恢复专用服务器启动检查配置
QiuYe-QAQ Nov 24, 2026
db96c76
收录第三方分发声明
QiuYe-QAQ Nov 24, 2026
d474f2f
整理中文注释和空值约定
QiuYe-QAQ Nov 24, 2026
c2f0ea4
编写中文使用说明
QiuYe-QAQ Nov 24, 2026
1461db7
按职责归并通用工具类
QiuYe-QAQ Nov 24, 2026
498e911
按领域整理集合调度与世界接口
QiuYe-QAQ Nov 24, 2026
69913d6
归拢客户端模型渲染与原版注入
QiuYe-QAQ Nov 24, 2026
5d31ed7
补齐通用数值与编解码工具
QiuYe-QAQ Nov 24, 2026
c5655b4
更新中文工具入口说明
QiuYe-QAQ Nov 24, 2026
67eb25c
精简项目说明
QiuYe-QAQ Nov 24, 2026
84f72a6
补齐文件读写与旧二进制布局
QiuYe-QAQ Nov 24, 2026
1142145
将二进制读写归入文件工具
QiuYe-QAQ Nov 24, 2026
faec468
统一文件序列化类型命名
QiuYe-QAQ Nov 24, 2026
85337d8
补齐数值字符串与随机抽样工具
QiuYe-QAQ Nov 24, 2026
f199cac
补齐注册表查询与堆叠工具
QiuYe-QAQ Nov 24, 2026
adae4b5
补齐颜色与文本显示工具
QiuYe-QAQ Nov 24, 2026
e345d89
补齐坐标世界与配方工具
QiuYe-QAQ Nov 24, 2026
4263639
将物品序列化与保存版本归入所属类型
QiuYe-QAQ Nov 24, 2026
2a280f2
归并区块查询和方块实体注入接口
QiuYe-QAQ Nov 24, 2026
daec8c8
将作用域键和拥有者类型归入 Scope
QiuYe-QAQ Nov 24, 2026
3de1b52
将物品需求契约归入配料匹配
QiuYe-QAQ Nov 24, 2026
3e73dc5
将渲染样式和帧来源归入对应入口
QiuYe-QAQ Nov 24, 2026
550e331
归并烘焙四边形适配和区段几何数据
QiuYe-QAQ Nov 24, 2026
b27689a
补齐玩家像素附着与资源释放
QiuYe-QAQ Nov 24, 2026
6932a1e
补齐数组查找与装备槽查询
QiuYe-QAQ Nov 24, 2026
d899aee
恢复调度作用域的文档生成
QiuYe-QAQ Nov 24, 2026
efb4b61
补齐整量资源转移与空槽插入
QiuYe-QAQ Nov 24, 2026
1fd4724
补齐通用方块搜索和积雪操作
QiuYe-QAQ Nov 24, 2026
b2000ab
补齐普通顶点路径的环形效果
QiuYe-QAQ Nov 24, 2026
3dca3ae
完善公共工具 API 文档与边界处理
QiuYe-QAQ Nov 24, 2026
b0b2bb2
完善客户端 API 文档与输入渲染行为
QiuYe-QAQ Nov 24, 2026
5db6536
移除不适用的来源许可记录
QiuYe-QAQ Nov 24, 2026
556c508
格式化 API 文档注释
QiuYe-QAQ Nov 24, 2026
8856cf6
恢复独立第三方分发许可声明
QiuYe-QAQ Nov 24, 2026
f5587b9
修复弱身份缓存的迭代删除
QiuYe-QAQ Nov 24, 2026
cfcff61
补齐旧标签条目的二进制读写
QiuYe-QAQ Nov 24, 2026
eb051e2
恢复原始值缓存映射生成工具
QiuYe-QAQ Nov 24, 2026
5edbc96
补齐存档长整数的精确读取
QiuYe-QAQ Nov 24, 2026
c5a3f30
修复球形空间查询的半径溢出
QiuYe-QAQ Nov 24, 2026
99d07be
完善集合缓存和文件读写的接口文档
QiuYe-QAQ Nov 24, 2026
94fd386
补充世界索引、调度和异步存档文档
QiuYe-QAQ Nov 24, 2026
21cd013
补全客户端渲染与输入的接口文档
QiuYe-QAQ Nov 24, 2026
5ae9749
完善坐标、资源策略与通用数据文档
QiuYe-QAQ Nov 24, 2026
46a5d1c
补齐以方块为中心的区块覆盖范围
QiuYe-QAQ Nov 24, 2026
8cc109e
补齐图布局并使用原始类型寻路堆
QiuYe-QAQ Nov 24, 2026
d2b590e
补齐三轴方块模型旋转
QiuYe-QAQ Nov 24, 2026
8b0b79b
补齐四边形收集与顶点变换
QiuYe-QAQ Nov 24, 2026
d5ed3de
接入连接纹理裁切与原版模型包装
QiuYe-QAQ Nov 24, 2026
86a7cab
补齐同步组合键优先级与旧配置读取
QiuYe-QAQ Nov 24, 2026
b2c72fb
在强制刷盘和卸载时重试写入失败
QiuYe-QAQ Nov 24, 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# ChangeLog- no changes
# ChangeLog
- no changes
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# ModularMCLib-Template
# ModularMCLib Utils

面向 Minecraft 26.1.2、NeoForge 26.1.2.126 与 Java 25 的通用工具库。模组标识为 `mmclutils`。

## 安装与构建

将发布的完整 JAR 放入客户端或专用服的 `mods` 目录。

在仓库根目录运行 Gradle Wrapper,产物位于 `build/libs/`。

```powershell
.\gradlew.bat build
```

## 许可

本项目采用 GNU AGPL 3.0。 [许可证](src/main/resources/META-INF/licenses/AGPL-3.0.txt)
41 changes: 2 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'jacoco'
alias libs.plugins.modDevGradle
//alias libs.plugins.shadow
alias libs.plugins.spotless
alias libs.plugins.lombok
alias libs.plugins.kotlin.jvm
alias libs.plugins.kotlin.lombok
}

group = maven_group
Expand All @@ -32,11 +32,6 @@ sourceSets {
runtimeClasspath += main.output + main.runtimeClasspath
}

test {
compileClasspath += main.output + main.compileClasspath
runtimeClasspath += main.output + main.runtimeClasspath
}

extra {
compileClasspath += main.output
runtimeClasspath += main.output + main.runtimeClasspath
Expand Down Expand Up @@ -82,41 +77,9 @@ tasks.withType(JavaCompile).configureEach {
}

tasks.withType(Test).configureEach {
// Test sources are NeoForge GameTests and are executed by runGameTestServer, not JUnit.
failOnNoDiscoveredTests = false
}

lombok {
version = "1.18.38"
}

jacoco {
applyTo runGameTestServer
}

jacocoTestReport {
doFirst {
try {
runGameTestServer.exec()
} catch (RuntimeException ignored) {}
}
doLast {
println "Coverage report location:"
println " - file://${layout.buildDirectory.dir('coverage').map(a -> a.file('index.html')).get()}"
println " - file://${layout.buildDirectory.dir('coverage').map(a -> a.file('coverage.xml')).get()}"
}
executionData runGameTestServer
sourceSets sourceSets.test
reports {
csv.required = false
xml.required = true
html.outputLocation = layout.buildDirectory.dir('coverage')
xml.outputLocation = layout.buildDirectory.dir('coverage').map(a -> a.file('coverage.xml'))
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: '**/client/**')
fileTree(dir: it, exclude: '**/mixins/**')
}))
}
}
8 changes: 7 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
dependencies {
compileOnly(libs.jetbrains.annotations)
compileOnly(libs.jspecify)

testImplementation(libs.testframework.get())
// 与 Minecraft 共用运行库,供使用原始类型集合的公共接口声明依赖。
api(libs.fastutil)

jarJar(api(libs.kotlin.stdlib.get())) {
exclude group: 'org.jetbrains', module: 'annotations'
}


// Runtime Recipe Viewers - uncomment whichever one you want to use //
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ org.gradle.parallel = true
org.gradle.caching = true

# Mod Info
mod_id = template
mod_name = Template
mod_id = mmclutils
mod_name = ModularMCLibUtils
mod_version = 0.0.3
mod_description =
mod_license = GNU AGPL 3.0
mod_url = https://github.com/ModularMCLib/SyncedData-Lib/
mod_issue_tracker = https://github.com/ModularMCLib/SyncedData-Lib/issues/
maven_group = com.modularmc.synceddata
mod_url = https://github.com/ModularMCLib/ModularMCLib-Utils/
mod_issue_tracker = https://github.com/ModularMCLib/ModularMCLib-Utils/issues/
maven_group = com.modularmc.mmclutils
24 changes: 17 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
[versions]
minecraft = "26.1.2"
neoForge = "26.1.2.41-beta"
neoForge = "26.1.2.126"
lombok = "9.8.2"
loader = "4"
spotless = "8.4.0"
modDevGradle = "2.0.141"
lombok = "9.5.0"
shadow = "9.6.1"
spotless = "8.11.0"
modDevGradle = "2.0.148"
kotlin = "2.4.21"
jetbrains-annotations = "26.1.0"
renderNurse = "0.0.14"
jspecify = "1.0.0"
fastutil = "8.5.18"
renderNurse = "0.0.26"
mixin = "0.8.7"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
neoForge = { module = "net.neoforged:neoforge", version.ref = "neoForge" }
testframework = { module = "net.neoforged:testframework", version.ref = "neoForge" }
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
renderNurse = { module = "net.neoforged:render-nurse", version.ref = "renderNurse" }
mixin = { module = "org.spongepowered:mixin", version.ref = "mixin" }
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" }
fastutil = { module = "it.unimi.dsi:fastutil", version.ref = "fastutil" }

[plugins]
modDevGradle = { id = "net.neoforged.moddev", version.ref = "modDevGradle" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-lombok = { id = "org.jetbrains.kotlin.plugin.lombok", version.ref = "kotlin" }
3 changes: 1 addition & 2 deletions gradle/scripts/jars.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ java {
withSourcesJar()
}

// Use delombok'd files for sources
// 将 Lombok 生成的成员一并纳入源码包。
sourcesJar {
exclude {
sourceSets.main.allSource.contains it.file
Expand All @@ -28,7 +28,6 @@ afterEvaluate {
tasks.withType(org.gradle.jvm.tasks.Jar).configureEach {
destinationDirectory = file('build/libs/')
manifest.attributes([
'MixinConfigs': "synceddata.mixins.json",
'Specification-Title': project.name,
'Specification-Version': mod_version,
'Specification-Vendor': 'ModularMCLib Team',
Expand Down
46 changes: 3 additions & 43 deletions gradle/scripts/moddevgradle.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ neoForge {
"${mod_id}" {
sourceSet(sourceSets.main)
sourceSet(sourceSets.client)
sourceSet(sourceSets.test)
sourceSet(sourceSets.extra)
sourceSet(sourceSets.clientExtra)
}
Expand All @@ -38,7 +37,6 @@ neoForge {


gameDirectory.set(file('run/client'))
systemProperty('neoforge.enabledGameTestNamespaces', project.mod_id)
}

server {
Expand All @@ -48,60 +46,22 @@ neoForge {

gameDirectory.set(file('run/server'))
programArguments.addAll('--nogui', '--world', 'world-extra')
systemProperty('neoforge.enabledGameTestNamespaces', project.mod_id)
}

// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
// 让持续集成使用原版自带用例启动服务器、推进 Tick 并退出。
gameTestServer {
type = "gameTestServer"
sourceSet = sourceSets.test
sourceSet = sourceSets.extra
ideName = "Game Tests"

gameDirectory.set(file('run/gametest/server'))
systemProperty('neoforge.enabledGameTestNamespaces', project.mod_id)
environment('TEST', 'true')
}

gameTestClient {
client()
sourceSet = sourceSets.test
ideName = "Game Tests (Client)"

gameDirectory.set(file('run/gametest/client'))
systemProperty('neoforge.enabledGameTestNamespaces', project.mod_id)
environment('TEST', 'true')
}

data {
clientData()
serverData()
sourceSet = sourceSets.main
ideName = "Data Generation"

gameDirectory.set(file('run/data'))
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll('--mod', project.mod_id)
programArguments.addAll('--all')
programArguments.addAll('--output', file('src/generated/resources/').getAbsolutePath())
programArguments.addAll('--existing', file('src/main/resources/').getAbsolutePath())
programArguments.addAll('--tests', 'minecraft:always_pass')
}

// applies to all the run configs above
configureEach {
// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
systemProperty 'forge.logging.markers', 'REGISTRIES'
// Enable assertions for our classes in dev environment
jvmArgument('-ea:com.modularmc.template...')

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
logLevel = org.slf4j.event.Level.INFO
}
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading