Village Business
想经营自己的生意吗?是否厌倦了必须逐个与村民交谈才能进行交易?是否觉得村民交易大厅不人道,并希望有更好的方式?是否想要一个理由来大量生产某些物品,并让成果变得有趣?如果是这样,这个模组就是为你准备的!
Villager Business 允许你创建销售台(Sales Stand),这是一种新的方块,你可以将(几乎)任何物品放在上面出售。村民会定期光顾你的商店,并有机会用绿宝石交换这些物品。
每种物品都有各自的价格!村民更有可能购买受欢迎的物品,而访问商店的时间间隔取决于人们希望再次购买该物品的频率(食物经常出售,但船只则不然)。
这个模组旨在娱乐,未经测试以查看其与普通村民交易的平衡性,因此它可能非常低效或过于高效,我不知道。目标是拥有一个有趣的方块,让你拥有自己的商店、市场或自动化的物品消耗器和交易系统。
使用方法
销售台

制作一个销售台并将其放置在附近有村民的地方。将要出售的物品放入销售台中,村民可能会前来交换绿宝石。你也可以半价或双倍价格出售物品,这将改变出售几率以及顾客访问之间的时间间隔。给销售台提供红石信号将关闭商店,这会阻止村民购买物品,并允许自动化方块提取输入。
请求台

制作一个请求台并将其放置在附近有村民的地方。通过在请求槽中放置物品来设置请求的物品。用绿宝石填充请求台。村民偶尔会过来,用绿宝石交换你所需的物品。村民不太可能以这种方式向你出售物品,而且这些物品的价格会比当你出售它们时更高。给请求台提供红石信号将关闭商店,这会阻止村民购买物品,并允许自动化方块提取输入。
绿宝石碎粒
此模组添加了绿宝石碎粒(Emerald Nuggets),它们只是1/9个绿宝石。你可以像其他碎粒一样制作它们。
技术说明
物品价格
物品价格存储在配置文件中。价格已手动设置,可能并不非常平衡或合理,如果你发现某个价格不合理,请告诉我。如果特定物品不在文件中,其价格将根据合成配方计算,考虑到其成分的价格。任何需要从世界中收集或通过非合成方法创建(右键点击、熔炼、浇水等)的物品都需要添加到列表中,否则它将没有价格。
顾客行为
销售台每5秒尝试吸引半径50格内的所有成年村民(未工作或睡觉的),每个村民有10%的机会被吸引。然后村民会尝试到达销售台。如果他们无法在3分钟内到达,他们会感到沮丧。一旦他们到达销售台,他们会检查物品并有机会购买。这种几率可以通过加倍或减半物品价格来影响。在村民购买或拒绝物品后,他们会进入针对该特定物品的冷却期,并且在最小时间内不会被该物品再次吸引,具体时间取决于物品和价格。
不足之处
这是我第一个Minecraft模组,我没有任何Java或Mixin的经验。我本来很想为请求台槽添加Roughly Enough Items兼容性,但我失败了。
由于我不理解活动(Activities)的工作原理,村民被迫通过反复设置他们的行走位置直到到达销售台。
由于配置文件仅在文件不存在时才创建,如果我将来更新配置文件生成器,已经在使用模组的玩家不会获得新配置,除非他们删除当前的配置文件。
将此模组移植到其他Fabric版本或其他加载器是我不知道如何做的。如果你懂模组开发,请使用GitHub仓库贡献修复或改进,或者分叉它并制作你自己的版本。
Village Business
Ever wanted to run your own business? Are you tired of having to talk to every individual villager to trade with them? Do you feel like villager trading halls are inhumane and wish there was a better way? Do you want an excuse to just mass produce something and have something fun to do with the results? If so, this mod is for you!
Villager Business allows you to create Sales Stands, a new block where you can put (almost) any item for sale. Villagers will periodically visit your shop and have a chance to give you emeralds in exchange for the item.
Every item has its own price! Villagers are more likely to buy desirable items, and the time between visits to the shop depends on how frequently one would want to buy the item again (food sells frequently, but boats not so much).
This mod is meant for fun, it hasn't been tested to see if its balanced compared to normal villager trading, so it may be very inefficient or too efficient, I don't know. The goal is to have a fun block that lets you have your own store, market or automated item sink and trading.
How to use
Sales stand

Craft a Sales Stand and place it somewhere that has villagers nearby. Put the items you want to sell inside of the Sales Stand, and villagers may come to exchange emeralds for that item. You can also half or double the price of the item, which will change the chance of selling, and the time between customer visits. Giving the Sales Stand a redstone signal will close the shop, which prevents villagers from buying the item and allows for automation blocks to extract the input.
Request stand

Craft a Request Stand and place it somewhere that has villagers nearby. Set the requested item by placing an item in the Request slot. Load the request stand with emeralds. Villagers will ocationally come by and give you that item in exchange for emeralds. Villagers are unlikely to sell you items in this way, and the items will be more expensive than when you sell them. Giving the Request Stand a redstone signal will close the shop, which prevents villagers from buying the item and allows for automation blocks to extract the input.
Emerald Nuggets
This mod adds Emerald Nuggets, which are just 1/9th of an emerald. You can craft them like any other nugget.
Technical explanation
Item prices
Item prices are stored in a config file. Prices have been set manually and may not be very balanced or sensible, if you find a price that doesn't make sense please let me know. If a specific item is not in the file, its price will be calculated from crafting recipes, taking into account the price of its ingredients. Anything that has to be gathered from the world, or needs to be created with a method other than crafting (right clicking, smelting, watering, etc.) needs to be added to the list or it wont have a price.
Customer behavior
Sales Stands will attempt to attract all adult villagers (who is not working or sleeping) in a 50 block radius every 5 seconds, with a 10% chance for each one. The villager will then try to get to the stand. They will get frustrated if they cant reach it in 3 minutes. Once they arrive to the stand, they will inspect the item and have a chance to purchase it. This chance can be affected by doubling or halving the price of the item. After the villager either buys or rejects the item, they enter a cooldown for that specific item, and they wont be attracted by this item again for a minimum time, depending on the item and the price.
Shortcomings
This is my first minecraft mod ever, and I don't have any previous experience with Java or Mixins. I would have loved to add Roughly Enough Items compatibility to the request stand slot, but I failed.
Villagers are forced to move to Sales Stands by repeatedly setting their walk position until they arrive, since I don't understand how Activities work.
Since the config file gets created only if the file doesn't exist already, if I ever update the config file generator, people that where already using the mod will not get the new config unless they delete their current config.
Porting this mod to other fabric versions, or to other mod loaders, is something I don't know how to do. If you know modding, please use the github repository to contribute fixes or improvements, or fork it and make your own version.
评论 0
登录后参与评分
还没有评论,来抢沙发吧