This commit is contained in:
BRanulf 2025-07-17 09:40:22 +08:00
parent 7bed25b441
commit 3eabe96e6f
9 changed files with 78 additions and 98 deletions

View File

@ -1,14 +1,75 @@
# 源README # 源README
Download the mod at [Modrinth](https://modrinth.com/mod/disc-jockey) or [CurseForge](https://www.curseforge.com/minecraft/mc-mods/disc-jockey) Download the mod at [Modrinth](https://modrinth.com/mod/disc-jockey) or [CurseForge](https://www.curseforge.com/minecraft/mc-mods/disc-jockey)
# 该版本附加 # 该版本附加
## 关于此项目 ___
此 Mod 是基于 [Disc-Jockey](https://github.com/SemmieDev/Disc-Jockey)(由 [SemmieDev](https://github.com/SemmieDev/) 开发)的修改版本,适配了 Minecraft 1.21.4。 # Disc Jockey Revive
原始代码版权归原作者所有,修改部分版权归 BRanulf 所有。
同时,该二改版本我本人并没有上传至任何其他网站(包括 Modrinth 、CurseForge 、Github 等),请勿用于商业用途及其他非法用途 一个 Minecraft Fabric 模组,旨在为音符盒音乐爱好者提供强大的播放和即兴演奏功能
目前[Modrinth](https://modrinth.com/mod/disc_jockey_revive)上的这个版本非本人上传就当允许上传了罢毕竟我比较懒XD ## 模组特性
[最新版本下载Release](https://git.branulf.top/Branulf/DIsc_Jockey_revive/releases) ### 🎵 歌曲播放
- **播放 `.nbs` 歌曲文件**:支持标准的 Note Block Studio (`.nbs`) 歌曲文件(暂不支持带变速的)。
- **文件夹管理**:支持歌曲文件夹,方便组织和浏览您的音乐库。
- **多种播放模式**
- **单曲循环**:重复播放当前歌曲。
- **列表循环**:按顺序循环播放当前文件夹或列表中的歌曲。
- **随机播放**:随机播放当前文件夹或列表中的歌曲。
- **播完停止**:歌曲播放完毕后自动停止。
- **播放进度条**:在 HUD 上显示歌曲播放进度和时间。
- **实时调速**在播放界面通过滑块实时调整歌曲播放速度0.25x - 4.0x)。
- **播放失败处理**:当附近音符盒配置不正确时,可选择停止播放或自动播放下一首。
- **音符盒材料清单**:显示播放当前歌曲所需的所有音符盒材料及数量。
- **自动调音**:模组会自动识别并调音附近的音符盒以匹配歌曲音高。
- **全向音符盒音效 (客户端)**
- **常规模式**:在播放歌曲或预览时,使音符盒音效全向传播,提供更沉浸的听觉体验。
- **强制模式**:强制所有音符盒音效(包括手动触发的)始终全向传播。
~~这边建议去给原作者点个Star~~ ### 🎹 即兴演奏 (Live DJ)
- **独立界面**:通过专用快捷键打开一个独立界面,用于即兴演奏。
- **键盘弹奏**:利用键盘按键直接弹奏音符盒,就像在 FL Studio 中一样。
- **自定义键位映射**
- 独立的键位映射配置界面,允许您为每个键盘按键设置特定的音符(乐器和音高)。
- 默认提供类似于 FL Studio 的键盘布局预设。
- **即兴演奏调音**:在即兴演奏界面中,可以一键对周围的音符盒进行调音,以确保弹奏的音符准确无误。
- **独立于歌曲播放**:即兴演奏功能与歌曲播放功能完全独立,互不干扰。
### ⚙️ 配置与调试
- **Mod Menu 集成**:通过 Mod Menu 轻松访问模组配置。
- **快捷键**
- 打开歌曲选择界面 (默认 `J`)。
- 打开即兴演奏界面 (默认 `UNKNOW未指定`)。
- **调试模式**:可配置的调试模式,开启后会在日志中输出详细的调试信息,方便排查问题。
## 如何使用
1. **安装**:将 `Disc Jockey Revive` 模组文件和 Fabric API 放入您的 Minecraft `mods` 文件夹。
2. **添加歌曲**
* 在游戏中打开歌曲选择界面 (默认 `J` 键)。
* 点击“打开文件夹”按钮,将 `.nbs` 歌曲文件放入弹出的 `disc_jockey/songs` 文件夹中。
* 您也可以直接将 `.nbs` 文件拖放到歌曲选择界面中。
* 点击“重新加载”按钮以加载新添加的歌曲。
3. **播放歌曲**
* 在歌曲选择界面中选择一首歌曲。
* 点击“播放”按钮。模组将自动寻找并调音附近的音符盒。
* 确保您处于生存模式或创造模式,并且附近有足够的音符盒。
* 您可以通过滑块调整播放速度,并通过播放模式按钮切换循环方式。
4. **即兴演奏**
* 在游戏中打开即兴演奏界面 (默认 `UNKNOW` 键)。
* 点击“开始调音”按钮,模组将自动调音附近的音符盒。
* 调音完成后,您可以使用键盘按键直接弹奏音符盒。
* 点击“编辑键位映射”按钮可以自定义每个按键对应的音符。
## 注意事项
* **服务器兼容性**:此模组通过发送玩家交互数据包来控制音符盒。在某些服务器上,这可能被反作弊插件误判为作弊行为。**强烈建议在使用前联系服务器管理员。**
* **音符盒数量**:为了获得最佳播放效果,请确保您周围有足够数量且种类齐全的音符盒。
* **非官方版本**:此版本为非官方修订版,仅供学习和参考。请支持原版模组作者。
## 贡献与支持
如果您有任何问题、建议或发现 Bug请联系[BRanulf](https://space.bilibili.com/479966868)(仅限于改二改版本,原版本请前往[原作者GitHub](https://github.com/SemmieDev/Disc-Jockey))。
不回复是正常现象因为我也只是随便做做并没有打算正经地维护真要搞的化我估计会去GitHub创建分支而不是只在自己仓库中修改。
---

View File

@ -10,7 +10,7 @@ repositories {
url 'https://maven.fabricmc.net/' // loom url 'https://maven.fabricmc.net/' // loom
} }
maven { maven {
url 'https://masa.dy.fi/maven' // mama便 url 'https://masa.dy.fi/maven' // masa便
} }
maven { maven {
url 'https://maven.fallenbreath.me/releases' // preprocessor url 'https://maven.fallenbreath.me/releases' // preprocessor

View File

@ -8,7 +8,7 @@ loader_version=0.16.10
mod_name=Disc Jockey Revive mod_name=Disc Jockey Revive
mod_id=disc_jockey_revive mod_id=disc_jockey_revive
# Mod Properties # Mod Properties
mod_version=1.14.514.047 mod_version=1.14.514.048
maven_group=semmiedev maven_group=semmiedev
archives_base_name=disc_jockey_revive archives_base_name=disc_jockey_revive
# Dependencies # Dependencies

View File

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.cottonmc</groupId>
<artifactId>LibGui</artifactId>
<version>12.0.1+1.21.2</version>
<name>LibGui</name>
<description>Minecraft GUI Library</description>
<url>https://github.com/CottonMC/LibGui</url>
<licenses>
<license>
<name>MIT</name>
<url>https://github.com/CottonMC/LibGui/blob/HEAD/LICENSE</url>
</license>
</licenses>
<developers>
<developer>
<name>CottonMC</name>
<url>https://github.com/CottonMC</url>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>io.github.juuxel</groupId>
<artifactId>libninepatch</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.fabricmc.fabric-api</groupId>
<artifactId>fabric-api-base</artifactId>
<version>0.4.48+c47b9d4373</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.fabricmc.fabric-api</groupId>
<artifactId>fabric-networking-api-v1</artifactId>
<version>4.3.3+56ec7ac673</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.fabricmc</groupId>
<artifactId>fabric-loader</artifactId>
<version>0.16.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.fabricmc.fabric-api</groupId>
<artifactId>fabric-lifecycle-events-v1</artifactId>
<version>2.3.22+c47b9d4373</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.fabricmc.fabric-api</groupId>
<artifactId>fabric-rendering-v1</artifactId>
<version>8.0.5+c47b9d4373</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.fabricmc.fabric-api</groupId>
<artifactId>fabric-resource-loader-v0</artifactId>
<version>3.0.5+c47b9d4373</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.github.cottonmc</groupId>
<artifactId>Jankson-Fabric</artifactId>
<version>9.0.0+j1.2.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.terraformersmc</groupId>
<artifactId>modmenu</artifactId>
<version>13.0.3</version>
</project>

View File

@ -36,7 +36,7 @@ public class DebugLogger {
if (client != null && client.inGameHud != null && client.inGameHud.getChatHud() != null) { if (client != null && client.inGameHud != null && client.inGameHud.getChatHud() != null) {
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of("[DiscJockeyRevive-调试]"+message.formatted(Formatting.GRAY))); MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of("[DiscJockeyRevive-调试]"+message.formatted(Formatting.GRAY)));
} else { } else {
Main.LOGGER.error("[DiscJockeyRevive-调试] 聊天窗口未初始化,{}",message); // Main.LOGGER.error("[DiscJockeyRevive-调试] 聊天窗口未初始化,{}",message);
} }
} }
} }

View File

@ -14,9 +14,13 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding; import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil; import net.minecraft.client.util.InputUtil;
import net.minecraft.client.world.ClientWorld; import net.minecraft.client.world.ClientWorld;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.text.MutableText; import net.minecraft.text.MutableText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.Formatting; import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;

View File

@ -325,7 +325,8 @@ public class DiscJockeyScreen extends Screen {
int screenWidth = context.getScaledWindowWidth(); int screenWidth = context.getScaledWindowWidth();
// 进度条 // 播放进度条
// TODO 关于可拖动什么的以后再加这里放个TODO防止以后忘了
if (Main.SONG_PLAYER.running && Main.SONG_PLAYER.song != null) { if (Main.SONG_PLAYER.running && Main.SONG_PLAYER.song != null) {
int progressBarX = 10; int progressBarX = 10;
int progressBarY = height - 52; // 按钮上方 int progressBarY = height - 52; // 按钮上方
@ -343,7 +344,7 @@ public class DiscJockeyScreen extends Screen {
); );
} }
// 进度条 // 预览进度条
if (Main.PREVIEWER.running && Main.PREVIEWER.song != null) { if (Main.PREVIEWER.running && Main.PREVIEWER.song != null) {
int progressBarX = 10; int progressBarX = 10;
int progressBarY = height - 37; // 比上一个低一点 int progressBarY = height - 37; // 比上一个低一点