Black Hole Mod
一款为你的世界添加破坏性动态黑洞的 Minecraft 模组。
- Github:
- Modrinth:
- Discord:
- Youtube:
概述
Black Hole 模组引入了一种新方块,能在你的 Minecraft 世界中生成模拟黑洞。这些黑洞具有逼真的引力效果,会将附近的实体和方块吸入其中。它们会随时间增长、追踪玩家,并在其路径上造成破坏。
注意:在没有备份的情况下请勿在你的世界中使用此模组!!
特性
- 逼真物理:黑洞根据可配置的质量值对附近的实体和方块施加引力
- 黑洞生长:黑洞会随时间扩张,扩大其影响范围
- 玩家追踪:黑洞可以在可配置的距离内追踪玩家
- 视觉效果:提供可自定义的粒子效果,带来沉浸式体验
- 完全可配置:所有黑洞行为方面均可通过命令或配置文件进行调整
- 创造模式集成:黑洞物品同时存在于自定义创造标签页和原版红石方块标签页中
纹理包
本模组使用 Polymer 进行自定义渲染,并需要纹理包来显示黑洞视觉效果。在游戏中使用 /polymer generatepack 命令创建默认纹理包,然后将生成的包(位于 polymer 文件夹中的 resource_pack)拖入你的资源文件夹,或使用服务端资源包。有关更多详细信息,请参阅 Polymer 文档。
命令
所有命令都需要操作者权限等级 2 或更高,并以 /blackhole 开头:
配置命令
| 命令 |
描述 |
getmaxscale / setmaxscale <value> |
获取/设置黑洞的最大生长尺寸 |
getgravity / setgravity <value> |
获取/设置引力常数 |
getplayermass / setplayermass <value> |
获取/设置玩家的质量值 |
getblockmass / setblockmass <value> |
获取/设置方块的质量值 |
getitementitymass / setitementitymass <value> |
获取/设置物品实体的质量值 |
getanimalmass / setanimalmass <value> |
获取/设置动物实体的质量值 |
getchunkloadradius / setchunkloadradius <value> |
获取/设置强制加载黑洞周围区块的半径 |
getmaxblockspertick / setmaxblockspertick <value> |
获取/设置每刻处理的最大方块数 |
getmovementspeed / setmovementspeed <value> |
获取/设置追踪状态下的黑洞移动速度 |
getdefaultfollowrange / setdefaultfollowrange <value> |
获取/设置黑洞检测玩家的默认范围 |
getplayerdetectioninterval / setplayerdetectioninterval <value> |
获取/设置玩家检测检查之间的刻数间隔 |
getgrowthrate / setgrowthrate <value> |
获取/设置黑洞的生长速率 |
getparticles / toggleparticles |
全局开启/关闭粒子效果 |
黑洞操控命令
| 命令 |
描述 |
togglefollow |
切换最近的黑洞是否追踪玩家 |
togglegrowth |
切换最近的黑洞是否会随时间生长 |
setfollowrange <range> |
设置最近黑洞的追踪范围 |
kill |
永久移除最近的黑洞及其视觉效果(需要服务端 1.21.11+ 功能) |
配置
模组会在 config/black_hole.json 创建配置文件,包含以下默认值:
{
"maxScale": 40.0,
"gravity": 60.0,
"playerMass": 700.0,
"blockMass": 10.0,
"itemEntityMass": 0.1,
"animalMass": 50.0,
"chunkLoadRadius": 2,
"maxBlocksPerTick": 500,
"movementSpeed": 1.0,
"defaultFollowRange": 256.0,
"playerDetectionInterval": 60,
"growthRate": 0.04,
"particlesEnabled": true
}
配置属性
| 属性 |
描述 |
默认值 |
maxScale |
黑洞最大生长尺寸 |
40.0 |
gravity |
影响吸力的引力常数 |
60.0 |
playerMass |
玩家的质量值(影响被吸引的力度) |
700.0 |
blockMass |
方块的质量值 |
10.0 |
itemEntityMass |
物品实体的质量值 |
0.1 |
animalMass |
动物实体的质量值 |
50.0 |
chunkLoadRadius |
强制加载黑洞周围区块的半径 |
2 |
maxBlocksPerTick |
每刻处理的最大方块数(性能设置) |
500 |
movementSpeed |
追踪玩家时的移动速度 |
1.0 |
defaultFollowRange |
黑洞检测玩家的默认范围 |
256.0 |
playerDetectionInterval |
玩家检测检查之间的刻数间隔 |
60 |
growthRate |
黑洞体积增长的快慢 |
0.04 |
particlesEnabled |
是否全局启用粒子效果 |
true |
行为说明
- 任何过于靠近黑洞中心的实体都会被吞噬
- 创造模式玩家免疫黑洞效果
- 黑洞可以破坏大多数方块,但无法破坏具有无限硬度的方块(如基岩)
- 可以配置黑洞不追踪玩家或停止生长
- 为了视觉效果,黑洞会从某些被破坏的方块中生成掉落物实体
- 每个黑洞都保持自己独立的追踪和生长设置
- 为了在服务器或低配设备上获得更好的性能,可以关闭粒子效果
- 黑洞物品可以在自定义的 "BlackHole" 创造标签页或原版红石方块标签页中找到
技术信息
- 基于 Fabric 和 Polymer 构建,兼容原版客户端
- 使用区块强制加载技术,确保玩家距离较远时黑洞仍能正常运行
- 实现了自定义方块实体,采用基于刻(tick)的行为逻辑
- 支持服务端资源包以分发纹理
已知问题
- 黑洞渲染问题:当玩家改变视角时,黑洞看起来像是圆形在移动。这是由于物品展示实体的显示模式被设置为“广告牌”(billboard)所致,修复此问题需要涉及我尚未理解的高级数学知识。
- 视距问题:即使处于常规视距范围内,当玩家移动得较远时,黑洞也会消失。这是由于实体渲染的限制所致。
如果您找到任何修复方案,请通过 GitHub 提交 Pull Request:
欢迎踊跃提交您的修复代码!!
兼容性
本模组基于 Fabric 构建,并依赖以下组件:
许可证
保留所有权利 - IDoTheHax 2025
致谢
由 IDoTheHax 创建
Black Hole Mod
A Minecraft mod that adds destructive, dynamic black holes to your world.
- Github:
- Modrinth:
- Discord:
- Youtube:
Overview
The Black Hole mod introduces a new block that creates a simulated black hole in your Minecraft world. These black holes have realistic gravitational effects, pulling in nearby entities and blocks. They can grow over time, follow players, and cause destruction in their path.
PSA: DONT USE THIS IN YOUR WORLD WITHOUT MAKING A BACKUP!!
Features
- Realistic Physics: Black holes exert gravitational force on nearby entities and blocks based on configurable mass values
- Growing Black Holes: Black holes can expand over time, increasing their area of effect
- Player Tracking: Black holes can follow players within a configurable range
- Visual Effects: Features customizable particle effects for an immersive experience
- Fully Configurable: All aspects of black hole behavior can be adjusted via commands or configuration file
- Creative Mode Integration: Black hole item available in both custom creative tab and vanilla Redstone Blocks tab
Texture Pack
This mod uses Polymer for custom rendering and requires a texture pack for the black hole visuals. Use the /polymer generatepack command in-game to create a default texture pack, then drag the generated pack (named resource_pack in the polymer folder) into your resources folder or use a serverside resource pack. See the Polymer Documentation for more details.
Commands
All commands require operator permission level 2 or higher and begin with /blackhole:
Configuration Commands
| Command |
Description |
getmaxscale / setmaxscale <value> |
Get/set maximum size a black hole can grow to |
getgravity / setgravity <value> |
Get/set gravitational constant |
getplayermass / setplayermass <value> |
Get/set mass value for players |
getblockmass / setblockmass <value> |
Get/set mass value for blocks |
getitementitymass / setitementitymass <value> |
Get/set mass value for item entities |
getanimalmass / setanimalmass <value> |
Get/set mass value for animal entities |
getchunkloadradius / setchunkloadradius <value> |
Get/set radius of chunks to force-load around a black hole |
getmaxblockspertick / setmaxblockspertick <value> |
Get/set maximum blocks processed per tick |
getmovementspeed / setmovementspeed <value> |
Get/set movement speed of following black holes |
getdefaultfollowrange / setdefaultfollowrange <value> |
Get/set default range for black holes to detect players |
getplayerdetectioninterval / setplayerdetectioninterval <value> |
Get/set ticks between player detection checks |
getgrowthrate / setgrowthrate <value> |
Get/set growth rate for black holes |
getparticles / toggleparticles |
Get/toggle particle effects on/off globally |
Black Hole Manipulation Commands
| Command |
Description |
togglefollow |
Toggle whether the nearest black hole follows players |
togglegrowth |
Toggle whether the nearest black hole grows over time |
setfollowrange <range> |
Set the follow range for the nearest black hole |
kill |
Permanently remove the nearest black hole and its visuals (requires server-side 1.21.11+ features) |
Configuration
The mod creates a configuration file at config/black_hole.json with the following default values:
{
"maxScale": 40.0,
"gravity": 60.0,
"playerMass": 700.0,
"blockMass": 10.0,
"itemEntityMass": 0.1,
"animalMass": 50.0,
"chunkLoadRadius": 2,
"maxBlocksPerTick": 500,
"movementSpeed": 1.0,
"defaultFollowRange": 256.0,
"playerDetectionInterval": 60,
"growthRate": 0.04,
"particlesEnabled": true
}
Configuration Properties
| Property |
Description |
Default |
maxScale |
Maximum size a black hole can grow to |
40.0 |
gravity |
Gravitational constant affecting pull strength |
60.0 |
playerMass |
Mass value for players (affects how strongly they're pulled) |
700.0 |
blockMass |
Mass value for blocks |
10.0 |
itemEntityMass |
Mass value for item entities |
0.1 |
animalMass |
Mass value for animal entities |
50.0 |
chunkLoadRadius |
Radius of chunks to force-load around a black hole |
2 |
maxBlocksPerTick |
Maximum blocks processed per tick (performance setting) |
500 |
movementSpeed |
Movement speed when following players |
1.0 |
defaultFollowRange |
Default range for black holes to detect players |
256.0 |
playerDetectionInterval |
Ticks between player detection checks |
60 |
growthRate |
How quickly black holes grow in size |
0.04 |
particlesEnabled |
Whether particle effects are enabled globally |
true |
Behavior Notes
- Black holes will consume any entity that gets too close to its center
- Creative mode players are immune to black hole effects
- Black holes can break most blocks but cannot break blocks with infinite hardness (like bedrock)
- Black holes can be configured to not follow players or to stop growing
- Black holes will create falling block entities from some destroyed blocks for visual effect
- Each black hole maintains its own settings for following and growth
- Particle effects can be toggled off for better performance on servers or lower-end systems
- The black hole item can be found in the custom "BlackHole" creative tab or in the vanilla Redstone Blocks tab
Technical Information
- Built with Fabric and Polymer for vanilla client compatibility
- Uses chunk force-loading to ensure black holes function even when players are distant
- Implements custom block entity with tick-based behavior
- Supports server-side resource packs for texture distribution
Known Issues
- Black Hole Rendering Issue: The black hole often looks like the circle is moving when the player changes their view, this is due to the display mode of the item display being set to billboard, advanced maths that i dont understand is required to fix this.
- Render Distance Issue: The black hole disappears when moving too far away, even within typical render distances, due to entity rendering limitations.
Any fixes found can be submitted through a Pull request on the Github:
Don't Hesitate to add your fixes!!
Compatibility
This mod is built for Fabric and requires:
License
All Rights Reserved - IDoTheHax 2025
Credits
Created by IDoTheHax
评论 0
登录后参与评分
还没有评论,来抢沙发吧