Woolproofed
一款 Minecraft Fabric 模组,当羊毛方块位于声源与玩家之间时,会阻挡声音传播。非常适合用于制作隔音房间或减少建筑中的噪音污染!
视频预览
功能特性
- 声音阻挡:当羊毛方块位于声源与玩家的视线路径上时,自动阻挡声音
- 支持所有羊毛颜色:适用于全部 16 种羊毛颜色(白色、橙色、品红、浅蓝色、黄色、黄绿色、粉色、灰色、淡灰色、青色、紫色、蓝色、棕色、绿色、红色、黑色)
- 可配置:可通过按键绑定开启或关闭声音阻挡功能
- 智能检测:仅阻挡距离玩家足够远的声音,防止误挡近距离音效
- 性能优化:采用高效的射线投射算法,并支持自定义检测间隔
安装方法
前置要求
- Minecraft 1.20.1
- Fabric Loader 0.17.2 或更高版本
- Fabric API
- Java 17 或更高版本
安装步骤
- 从 发布页面 下载最新版本
- 将 JAR 文件放入你的
mods 文件夹中
- 确保已安装 Fabric API
- 使用 Fabric Loader 启动 Minecraft
使用方法
基础声音阻挡
只需在自身与任何声源之间放置羊毛方块即可。模组会自动检测并阻挡穿过羊毛的声音。
按键绑定
- B 键(默认):切换声音阻挡功能的开启/关闭状态
- 你可以在“控制”菜单的“Woolproofed”分类下更改此按键绑定
配置选项
模组包含多个可配置选项:
- 启用:切换整个声音阻挡系统
- 最小距离:低于此距离的声音不会被阻挡(默认:1.0 格)
- 检测间隔:沿声音路径检查羊毛方块的频率(默认:0.5 格)
- 阻挡界面声音:是否阻挡界面音效(默认:false)
工作原理
模组使用射线投射算法来检查声源与玩家之间的直线上是否存在羊毛方块:
- 当声音即将播放时,模组计算从声源到玩家的方向
- 按固定间隔检查该路径上的每个方块
- 如果发现任何羊毛方块,则阻挡声音
- 如果没有发现羊毛方块,则声音正常播放
从源码构建
前置要求
构建步骤
-
克隆仓库:
git clone https://github.com/SSnowly/woolproofed.git
cd woolproofed
-
构建模组:
./gradlew build
-
构建生成的 JAR 文件位于 build/libs/ 目录中
开发
贡献代码
- Fork 本仓库
- 创建功能分支
- 进行修改
- 进行全面测试
- 提交拉取请求
许可证
本项目采用 MIT 许可证授权 - 详见 LICENSE 文件。
支持
致谢
注意:此模组仅客户端有效,不会影响多人服务器上的其他玩家。每位玩家需要单独安装该模组才能享受声音阻挡功能。
Woolproofed
A Minecraft Fabric mod that blocks sounds when wool is placed between the sound source and the player. Perfect for creating soundproof rooms or reducing noise pollution in your builds!
Video Preview
Features
- Sound Blocking: Automatically blocks sounds when wool blocks are in the line of sight between the sound source and player
- All Wool Colors: Works with all 16 wool colors (white, orange, magenta, light blue, yellow, lime, pink, gray, light gray, cyan, purple, blue, brown, green, red, black)
- Configurable: Toggle sound blocking on/off with a key binding
- Smart Detection: Only blocks sounds that are far enough from the player to prevent blocking nearby sounds
- Performance Optimized: Efficient raycasting algorithm with configurable check intervals
Installation
Prerequisites
- Minecraft 1.20.1
- Fabric Loader 0.17.2 or higher
- Fabric API
- Java 17 or higher
Steps
- Download the latest release from the releases page
- Place the JAR file in your
mods folder
- Make sure you have Fabric API installed
- Launch Minecraft with Fabric Loader
Usage
Basic Sound Blocking
Simply place wool blocks between yourself and any sound source. The mod will automatically detect and block sounds that pass through the wool.
Key Bindings
- B Key (default): Toggle sound blocking on/off
- You can change this key binding in the Controls menu under the "Woolproofed" category
Configuration
The mod includes several configurable options:
- Enabled: Toggle the entire sound blocking system
- Minimum Distance: Sounds closer than this distance won't be blocked (default: 1.0 blocks)
- Check Interval: How frequently to check for wool blocks along the sound path (default: 0.5 blocks)
- Block UI Sounds: Whether to block interface sounds (default: false)
How It Works
The mod uses a raycasting algorithm to check if there are any wool blocks in a straight line between the sound source and the player:
- When a sound is about to play, the mod calculates the direction from the sound source to the player
- It checks every block along this path at regular intervals
- If any wool block is found, the sound is blocked
- If no wool blocks are found, the sound plays normally
Building from Source
Prerequisites
Steps
-
Clone the repository:
git clone https://github.com/SSnowly/woolproofed.git
cd woolproofed
-
Build the mod:
./gradlew build
-
The built JAR will be in build/libs/
Development
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Credits
Note: This mod is client-side only and will not affect other players on multiplayer servers. Each player needs to have the mod installed to benefit from sound blocking.
评论 0
登录后参与评分
还没有评论,来抢沙发吧