Ore Generation Disabler
本模组受 KubeJS 移除 WorldGen 类的启发,此举使得整合包制作者通过脚本管理和禁用矿石生成变得更加困难。Ore Generation Disabler 被创建为在现代 NeoForge 整合包中控制主世界矿石生成的轻量级替代方案。
该模组在区块生成之前移除产生矿石的世界生成功能(worldgen features)。它不是在生成后替换方块,而是直接阻止匹配的矿石生成功能在最初运行。
矿石通过一个方块标签进行控制:
#oregenerationdisabler:disabled_overworld_ores
任何添加到此标签中的矿石方块都将被检测并用于禁用生成它的生成功能。
功能
- 在区块生成前禁用主世界的矿石生成。
- 使用可配置的方块标签而非硬编码的矿石列表。
- 兼容原版及众多模组矿石。
- 不会移除作为装饰放置在结构内的矿石。
- 专为拥有替代矿石生成系统的自定义整合包设计。
- 支持数据包和 KubeJS 标签编辑。
如何配置
首次启动后,模组会创建其配置文件。
示例
你也可以使用 KubeJS 将方块添加到标签中:
ServerEvents.tags('block', event => {
event.add('oregenerationdisabler:disabled_overworld_ores', [
'minecraft:iron_ore',
'minecraft:deepslate_iron_ore',
'minecraft:diamond_ore',
'minecraft:deepslate_diamond_ore'
])
})
重要提示
此模组仅影响新生成的区块。现有区块不会被更改。
该模组最初是为我的个人整合包制作,后来发布以帮助其他整合包开发者在 KubeJS 移除 WorldGen 后处理矿石生成问题。
欢迎 fork、改进或将其适应于你自己的项目。
Ore Generation Disabler
This mod was inspired by the removal of the WorldGen class from KubeJS, which made it much harder for modpack creators to manage and disable ore generation through scripts. Ore Generation Disabler was created as a lightweight alternative for controlling Overworld ore generation in modern NeoForge modpacks.
The mod removes ore-generating worldgen features before chunks are generated. Instead of replacing blocks after generation, it prevents matching ore features from running in the first place.
Ores are controlled through a block tag:
#oregenerationdisabler:disabled_overworld_ores
Any ore block added to this tag will be detected and used to disable the worldgen features that generate it.
Features
- Disables Overworld ore generation before chunk generation.
- Uses a configurable block tag instead of hardcoded ore lists.
- Works with vanilla and many modded ores.
- Does not remove ores placed inside structures as decoration.
- Designed for custom modpacks with alternative ore generation systems.
- Supports datapack and KubeJS tag editing.
How to configure
After the first launch, the mod creates its config files.
Example
You can also add blocks to the tag using KubeJS:
ServerEvents.tags('block', event => {
event.add('oregenerationdisabler:disabled_overworld_ores', [
'minecraft:iron_ore',
'minecraft:deepslate_iron_ore',
'minecraft:diamond_ore',
'minecraft:deepslate_diamond_ore'
])
})
Important notes
This mod affects newly generated chunks only. Existing chunks will not be changed.
Originally made for my personal modpack, this mod was later released to help other modpack developers deal with ore generation after WorldGen was removed from KubeJS.
Feel free to fork it, improve it, or adapt it for your own projects.
评论 0
登录后参与评分
还没有评论,来抢沙发吧