Shifting Wares
让村民自主重新刷新交易,每天最多三次。 此效果在能够出售附魔物品或染色物品的职业上最为明显;单个此类村民随时间推移将能提供更丰富多样的商品。
本模组旨在减少剥削式玩法的收益,同时使随机应变式玩法更具可行性。拥有完美交易的村民不会永远保留这些交易,而拥有糟糕交易的村民最终也会获得更好的交易。尽管单个村民理论上可能提供你需要的一切,但拥有多个同职业的村民仍然有用,因为这样可以增加获得特定交易的概率。
由于所有交易最终都会过期,如果村民死亡,替换它们变得容易得多,因此你不必过于担心他们的安全。你可以让他们自由 roam(漫游),几乎不会对经济造成风险。
重新刷新触发条件
有两个游戏规则(gamerule)控制交易何时可以重新刷新。默认情况下两者均启用。 禁用所有规则实际上等于禁用了该模组。
shifting-wares:daily_reroll: 导致村民在其工作站点首次补货时,全部重新刷新其交易,每天一次。shifting-wares:deplete_reroll: 导致村民在其工作站点补货时,重新刷新任何完全耗尽的交易。 如果某项交易仍有剩余使用次数,这也防止了其被补充。
探索地图与持久化交易
Minecraft 会永久保存所有生成的地图,并锁定其结构不再出现在其他探索地图上。为了防止每日重新刷新导致大量未售出的地图被丢弃,这些交易被视为持久化交易。
持久化交易只有在至少被使用过一次,且启用了游戏规则 shifting-wares:allow_persistent_reroll 时才能被重新刷新。该游戏规则默认处于禁用状态。
数据包可以通过向交易添加以下字段来标记任何交易为持久化:
{
"shiftingwares:isPersistent": true,
"wants": "...",
"gives": "...",
"...": "..."
}
任何出售已填充地图的交易都会被强制标记为持久化,无论其配置如何。“已填充地图”通过存在 map_id 组件来识别。
工作站保护
破坏并替换村民的工作站不再强制村民重新刷新其交易。初始交易是使用村民的 UUID 作为种子确定性生成的。
这由游戏规则 shifting-wares:workstation_protection 控制。
杂项技术细节
-
如果村民无法为某个槽位生成交易,它将替换为空交易。在原版中,这通常只发生在制图师身上,因为在没有结构的世界中,他们无法生成探险家地图。
这些空占位符是必需的,以确保交易以同等级的交易进行重新刷新,因为交易在列表中的位置是其等级的唯一指示。 占位符交易永远不会取代有效交易;只有当所有其他选项都用尽时,它们才会出现。 -
作为此模组的副作用,“需求奖励”机制的效果大大减弱,因为随着交易的重新刷新,需求奖励数据也会被删除。
-
在 MC 1.21.11 及更早版本中,耗尽重新刷新有较大概率创建重复交易,因为 Minecraft 当时没有可靠的方法来识别交易。
针对开发者(MC 1.21.11 及更早版本)
默认情况下,Shifting-Wares 假设每个等级有 2 个交易,并从与原版相同的地方获取其交易池。其他模组可以使用 shifting-wares 入口点并通过实现 ITradeLayoutProvider 来覆盖此行为。
如果你的模组包含自定义的地图交易工厂实现,或者生产带有永久数据的其他物品,你可以通过实现 IShiftingTradeFactory 中定义的方法,告知 Shifting-Wares 它们应该是持久化的。
相关模组
VillagerConfig Addon
兼容插件,用于使用 VillagerConfig 中定义的交易。
Gamerule Menu
使玩家能够从单人世界访问游戏规则菜单
Shifting Wares
Causes villager to re-roll their trade offers on their own accord, up to three times a day. This effect will be most noticeable on professions who can sell enchanted or coloured items; a single one of these villagers will be able to offer a much greater variety of wares over time.
This aims to reduce the benefits of exploitative playstyle, while making serendipitous playstyles more viable. Villagers with perfect trades will not keep those trades forever, and villagers with bad trades will get better eventually. Even though a single villager can potentially provide everything you need, having multiple villagers of the same profession is still useful to increase the odds of getting a specific trade.
Because all trades eventually expire, villagers become much easier to replace if they die, so you don't need to care as much about their safety. You can let them roam around freely with little risk to your economy.
Reroll Triggers
There are two gamerules that control when trades can be re-rolled. Both are enabled by default. Disabling all rules effectively disables the mod.
shifting-wares:daily_reroll: Causes villagers to re-roll all their offers once per day, the first time they restock at their job station.shifting-wares:deplete_reroll: Causes villagers to re-roll any fully depleted trade offer, whenever they restock at their job station. This also prevents offers from being refilled, if they have a remaining uses.
Exploration Maps and Persitent trades
Minecraft permanently saves all created maps, and lock their structures from appearing on other exploration maps. To prevent daily rerolls from throwing away endless amounts of unsold maps, these trades are treated as persistent.
Persistent trades can only be rerolled if they have been used at least once, and if the gamerule shifting-wares:allow_persistent_reroll is enabled. This gamerule is disabled by default.
Datapacks can mark any trade as persistent by adding this field to the trade:
{
"shiftingwares:isPersistent": true,
"wants": "...",
"gives": "...",
"...": "..."
}
Any trade that sells a filled map will be forcibly marked as persistent, regardless of how it is configured. "Filled maps" are identified by the presence of a map_id component.
Workstation protection
Breaking and replacing a villager's workstation no longer forces the villager to reroll its trades. The initial trades are generated deterministically, using the villager's UUID as the seed.
This is controlled by the gamerule shifting-wares:workstation_protection.
Miscellani technical details
-
If a villager is unable to generate a trade for a slot, it will be replaced with an empty trade. In vanilla, this should only ever happen to cartographers, who are unable to generate explorer maps in worlds with no structures.
These empty paddings are required to ensure trades are rerolled with ones of equivalent level, because a trade's position in the list is the only indication to its level. Placeholder trades will never take the place of a valid trade; they will only show up if all other options are exhausted. -
As a side effect of this mod, the "Demand Bonus" mechanic has its effect greatly diminished, because the demand bonus data is deleted along with the offers that are rerolled.
-
In MC 1.21.11 and prior, Depleted Rerolls have a fair chance of creating duplicate offers, because Minecraft had no reliable way of identifying trades.
For developpers (MC 1.21.11 and prior)
By default, shifting-Wares assumes 2 trades per level, and pulls its trade pools from the same place as Vanilla. Other mods can override this by using the shifting-wares entry-point, and implementing ITradeLayoutProvider.
If your mod contains custom implementation of map trade factories, or produces other items attached with permanent data, you can communicate to Shifting-Wares that they should be persistent, by implementing the same methods defined in IShiftingTradeFactory.
Related Mods
VillagerConfig Addon
Compatibility Addon to use trades defined in VillagerConfig.
Gamerule Menu
Makes the Gamerule menu accessible from singleplayer worlds
下载 Shifting Wares
下载 Shifting Wares
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Shifting Wares
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Shifting Wares
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Shifting Wares
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 移植至 MC 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
让你能够在世界中的任何位置定位结构。
模组
TerraFirmaCraft (TFC) 是一个全面转换模组,对生存模式进行了彻底的改造与重新设计。
模组
一堆修复
模组
如果游戏能告知重要的刷新点,会怎样?
模组
一款适用于你选择的加载器的 Minecraft VR 模组!
模组
为盔甲架添加图形用户界面,允许你配置其姿势和其他属性
评论 0
登录后参与评分
还没有评论,来抢沙发吧