径向资源限制
Radial Resource Gating 是一款面向整合包制作者的 NeoForge 1.21.1 模组,旨在让你更精准地控制矿石的生成位置。
该模组允许你定义世界出生点周围或每个维度自定义坐标周围的“允许资源区域”。在此区域内,矿石生成机制保持正常运作;而在区域之外,当矿石特性尝试生成匹配配置的矿石标签(ore tags)或方块 ID 的方块时,该生成过程将被取消。
其设计理念是在不改变玩家与世界的交互方式的前提下,使资源进度更容易掌控。在常规游玩中,该模组应当是“透明”且不可见的。所有设置均通过通用的 TOML 配置文件进行管理。
工作原理
Radial Resource Gating 可以分别为主世界、下界和末地单独启用。每个维度都拥有独立的中心模式、中心坐标和范围设置。
默认情况下,允许区域以保存的世界出生点为中心。你也可以将某个维度切换为固定中心模式,并手动指定 X 和 Z 坐标。
允许区域是一个正方形。例如,若范围为 256,则从中心向各个方向延伸 256 格范围内的矿石生成是被允许的。
当矿石特性开始生成时,模组会检查特性的起源位置。如果起源位于允许区域内,则整个特性被允许生成;如果起源位于允许区域外,则整个特性被取消。
这种设计使得系统既快速又简单,但也意味着边界并非逐块切割。矿石特性是基于其起始位置整体被允许或被阻挡的。
该模组仅影响新生成的区块。已存在的区块不会被修改。
配置
模组运行一次后,NeoForge 会在以下路径创建配置文件:
config/radialresourcegating-common.toml
默认配置如下所示:
blockedTags = ["c:ores"]
additionalBlockedBlocks = []
outsideAllowedBlocks = []
[overworld]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
[nether]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
[end]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
维度设置
每个维度部分控制该维度的资源门控。
enabled 选项用于开启或关闭门控。
centerMode 选项决定允许区域的中心位置。设置为 world_spawn 时,模组使用保存的主世界出生点作为基准中心;设置为 fixed 时,模组则使用配置的 centerX 和 centerZ 值。
range 选项控制允许区域从中心向外延伸的距离。当 centerX = 0、centerZ = 0 且 range = 256 时,矿石生成允许的范围是从 X -256 到 X 256 以及从 Z -256 到 Z 256。
在缩放维度中使用 centerMode = "world_spawn" 时,出生点位置会根据 Minecraft 的维度坐标比例进行转换。例如,如果主世界出生点位于 X 4000、Z 800,那么下界的门控将以 X 500、Z 100 为中心。
矿石匹配
默认情况下,该模组会在允许区域外阻止标记为 c:ores 的生成方块。
blockedTags = ["c:ores"]
你可以添加更多具体的方块至 additionalBlockedBlocks。这对于那些未被配置标签覆盖的矿石或类矿石方块非常有用。
additionalBlockedBlocks = ["examplemod:rich_copper_ore"]
你也可以通过 outsideAllowedBlocks 允许特定方块在区域外生成。这起到覆盖作用。如果一个方块列于此项中,即使它也匹配了被阻止的标签或额外阻止的方块条目,它仍可以在允许区域外生成。
outsideAllowedBlocks = ["minecraft:ancient_debris"]
无效的方块 ID 会被忽略,并在加载配置时记录一次日志。在正常的世界生成过程中,模组保持静默。
致整合包制作者须知
Radial Resource Gating 仅影响新世界生成。它不会移除或替换已存在区块中的矿石。
测试配置更改时,请确保生成新的区块。如果你在已经生成的地形中进行测试,旧的矿石分布仍将保留。
此模组主要旨在帮助那些希望让早期游戏资源变得本地化、可控或基于进度的整合包,同时保持配置规则之外的正常世界生成。
Bug 与问题
如有任何问题或疑问,欢迎点击下方图片加入 Discord 社区。
支持我们
Radial Resource Gating
Radial Resource Gating is a NeoForge 1.21.1 mod made for modpack creators who want more control over where ores can generate.
The mod lets you define an allowed resource area around the world spawn, or around custom coordinates for each dimension. Inside that area, ore generation works normally. Outside of it, ore features are cancelled when they try to generate blocks matching the configured ore tags or block ids.
The idea is to make resource progression easier to control without changing how players interact with the world. In normal gameplay, the mod is meant to stay invisible. Everything is handled through the common TOML config.
How It Works
Radial Resource Gating can be enabled separately for the Overworld, the Nether, and the End. Each dimension has its own center mode, center coordinates, and range.
By default, the allowed area is centered around the saved world spawn. You can also switch a dimension to a fixed center and manually choose the X and Z coordinates.
The allowed area is a square. For example, with a range of 256, ores are allowed up to 256 blocks away from the center on each side.
When an ore feature starts generating, the mod checks the feature origin. If the origin is inside the allowed area, the whole feature is allowed to generate. If the origin is outside the allowed area, the whole feature is cancelled.
This keeps the system fast and simple, but it also means the border is not cut block by block. Ore features are allowed or blocked as a whole, based on where they start.
The mod only affects newly generated chunks. Existing chunks are not modified.
Configuration
After the mod runs once, NeoForge creates the config file here:
config/radialresourcegating-common.toml
The default config looks like this:
blockedTags = ["c:ores"]
additionalBlockedBlocks = []
outsideAllowedBlocks = []
[overworld]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
[nether]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
[end]
enabled = true
centerMode = "world_spawn"
centerX = 0
centerZ = 0
range = 256
Dimension Settings
Each dimension section controls the resource gate for that dimension.
The enabled option turns the gate on or off.
The centerMode option decides where the allowed area is centered. When set to world_spawn, the mod uses the saved Overworld spawn as the base center. When set to fixed, the mod uses the configured centerX and centerZ values instead.
The range option controls how far the allowed area extends from the center. With centerX = 0, centerZ = 0, and range = 256, ores are allowed from X -256 to X 256 and from Z -256 to Z 256.
When using centerMode = "world_spawn" in scaled dimensions, the spawn position is converted using Minecraft's dimension coordinate scale. For example, if the Overworld spawn is at X 4000, Z 800, the Nether gate will be centered around X 500, Z 100.
Ore Matching
By default, the mod blocks generated blocks tagged as c:ores outside the allowed area.
blockedTags = ["c:ores"]
You can add more exact blocks through additionalBlockedBlocks. This is useful for ores or ore-like blocks that are not covered by the configured tags.
additionalBlockedBlocks = ["examplemod:rich_copper_ore"]
You can also allow specific blocks to generate outside the area with outsideAllowedBlocks. This acts as an override. If a block is listed there, it can generate outside the allowed area even if it also matches a blocked tag or an additional blocked block entry.
outsideAllowedBlocks = ["minecraft:ancient_debris"]
Invalid block ids are ignored and logged once when the config is loaded. During normal world generation, the mod stays silent.
Notes For Modpack Creators
Radial Resource Gating only affects new world generation. It does not remove or replace ores in chunks that already exist.
When testing config changes, make sure to generate fresh chunks. If you test in terrain that was already generated, the old ore placement will still be there.
This mod is mainly intended for packs that want to make early-game resources local, controlled, or progression-based while keeping normal world generation outside the configured rules.
Bugs and Issues
For any problems or questions, feel free to join the discord by clicking on the image below
Support us
评论 0
登录后参与评分
还没有评论,来抢沙发吧