适用于 Minecraft 1.20.1 和 1.21.1 的 Create 6 附加模组。
本模组旨在改进或扩展与 Create 模组相关的物流领域。
新增内容
承诺上限(工厂仪表改进)
我们都经历过这种情况。你设置了一个新的工厂仪表,请求 100 堆某种物品,结果发现你的生产设施跟不上节奏,Create 试图发送价值 1,000 包裹的原料,导致一切变得糟糕透顶。
承诺上限功能正是为此而生。在配置工厂仪表时,你现在可以设置其同时保持开放的承诺数量上限。例如,你可以限制它每次最多只等待一堆物品的到达。
你的工厂物流网格会感谢你的。
额外库存(补货仪表改进)
补货仪表相当不错,但我不喜欢的一点是它们会补充到特定数值,只要缺少哪怕一块圆石,它们就会请求精确的数量以再次达到该值。这有点愚蠢且浪费资源。因此,有了额外库存!举例来说,如果你有一个补货仪表设置为保留一堆圆石在手。通过此功能,你可以告诉补货仪表当可用数量低于请求级别(1 堆)时,请求额外的 8 堆物品。那么,假设存储中的圆石数量降至 32 个(半堆)。它不会请求 32 个圆石以恢复到一堆,而是会请求 544 个圆石。那是缺失的 32 个加上另外 8 堆。有点像阈值开关,但用于补货。并且由于补货仪表的工作方式,其 UI 略显笨拙。
正则表达式(包裹地址改进)
通配符很好用,但有时它们就是差那么一点感觉,对吧?好吧,如果你敢的话,尽管使用正则表达式。真的,你现在可以了。只需以 regex: 开头你的地址模式(不区分大小写),其余部分将被视为正则表达式。
收银机(新方块,类似股票行情显示器)
一个作为股票行情显示器替代方案的新方块。收银机专为商店使用而设计。它们具有提取物品的用户界面,而不是像股票行情显示器那样右键点击。此外,它们会在销售账本中追踪所有通过它们的销售记录。而且,它们看起来很棒!
作为一个小福利,你可以从收银机中取出销售账本,并用它点击保管员,以快速选择你卖出的所有物品。如果你手动补货,这对恢复商店库存非常有用。(这就像图纸加农炮的物品剪贴板列表一样工作。)
包裹加速器(新方块,打包机飞速运转)
这是一个配合打包机使用的辅助方块,该方块使用压力单位来加速前方的打包机。我使用 Sophisticated Storage 进行大量物品存储,随着系统的发展,单个打包机已成为发送物品的瓶颈。这是我的解决方案,允许更快地发送包裹,但需要付出代价。
包裹加速器至少需要 30 RPM 才能运作。
包裹编辑器(新方块,重命名包裹)
一种新的包裹处理方块。包裹编辑器类似于重新打包器,但它不是合并来自同一订单的包裹,而是允许你使用规则编辑包裹的地址。规则可以通过在包裹编辑器旁边放置告示牌,或将剪贴板附着在包裹编辑器侧面来输入。推荐使用剪贴板。
在为包裹编辑器编写规则时,第一行是要匹配的模式,第二行是用于替换匹配的文本。例如,假设你有带有前缀 Ware1- 的包裹被路由到仓库,完整的包裹名称可能是 Ware1-Floor2-Storage。如果你想让包裹到达仓库后去掉 Ware1- 前缀怎么办?很简单,只需将包裹通过具有以下模式和空白替换行的包裹编辑器:
Ware1-
包裹编辑器将在每个包裹名称的开头搜索 Ware1-,如果找到,则将其替换为空。你也可以这样写:
Ware1-{*}
$1
那里发生了什么?包裹编辑器将 { 和 } 之间的任何内容视为捕获组。换句话说,该文本会被保存,并可以通过在替换文本中添加 $ 加上你想要的数字来引用。当然,如果你想执行比通配符更高级的操作,也可以使用正则表达式。
最后,如果你使用剪贴板,还可以管理两种特殊行为:
- 如果你在模式行旁边的框中打勾,模式将被解释为不区分大小写。
- 如果你在替换行旁边的框中打勾,那么包裹编辑器将在该规则之后停止(假设该规则已匹配)。你可以使用此功能创建一个捕获所有规则的规则,如果未匹配任何其他规则,则将包裹发送到失物招领处。
列车网络监控外围设备(新方块,仅限 CC: Tweaked)
你知道什么很酷吗?火车。你知道什么更酷吗?拥有关于你火车的大型酷炫数据墙。到达、出发、火车的状态。火车对于物流也很重要。列车网络监控是一个单独的方块,允许你查找给定列车网络上任何车站和任何火车的实时数据。这包括正常列车站外围设备提供的所有内容,以及火车到达和出发的额外事件。你还可以查看系统中有多少包裹,以及附加到各个火车站的每个邮箱的状态。
如果你特别冒险,可以启用可选功能以查看有关火车库存的更多详细信息,并对远程火车和车站进行读写访问。想使用计算机动态更新时刻表?请便。然而,这是默认禁用的,因为在我看来它有点过于不平衡。
高矮座椅(新方块,基本上……是座椅?)
呃,座椅不算物流?你这是什么意思?你可以……坐在上面, 好吧,行。这些稍微超出了“额外物流”的范围,但 我们添加座椅是有充分理由的!当然是为了美观。
根据你为库存管理员选择的生物类型,默认座椅的高度 并不总是适合你当前的建筑需求。因此,我们添加了 矮座椅和高座椅。矮座椅高度为方块的 2/16,而高座椅 高度为方块的 14/16。(普通座椅自然是 8/16,即半格高。)
惰性轴(新方块,基本上就是轴)
我知道你在想什么。这也不是物流。而且 Create 早就有了轴。 振作点,Khloe。但这很重要,我保证。惰性轴是我尝试创建 对服务器性能友好的轴的一种努力。基本上,普通的轴每个方块 都有一个实体,对吧?这些会尽可能避免这种情况。只要你连续放置 超过两个惰性轴,在方块实体数量上你就会受益。如果你使用大量 的轴——我是说真的很多——那么用它们替换可能会帮助提升你的服务器性能。
柔性惰性轴(新方块,基本上是齿轮箱 + 惰性轴 + ???)
还有柔性惰性轴。它们类似于惰性轴,但可以朝任何方向连接。 不仅如此,它们还具有可配置的侧面。只需使用扳手点击某个侧面 即可暴露出轴。再次使用扳手可以反转方向。
但在连接时请小心。由于代码中的连接方式,如果存在不兼容旋转的问题, Create 有时会意外破坏一个位置不便的柔性惰性轴。
我提到过吗?惰性轴、柔性惰性轴和惰性齿轮都可以被覆盖。 它们支持安山岩外壳、黄铜外壳、铜外壳、工业铁块和风化铁块。(是的,我想实现火车外壳,但由于一些奇怪的技术原因,要实现起来有点棘手,至少我希望连接的纹理能正常工作。它最终会实现的™。)
改进
地址匹配器优化
Create 的软件包地址匹配功能稍微有点慢且未优化。这可能没问题, 但也可能导致在使用 Create 与其他模组时出现问题。我们 通过几个简单的更改来解决这个问题:
-
缓存已编译的匹配器。 每个软件包地址在执行软件包匹配时都会被编译成正则表达式。 这首先涉及将通配符模式解析为正则表达式,然后将正则表达式编译为 Java Pattern。 我们要做的只是缓存这个结果。
-
实际上有两个缓存,因为软件包地址系统的内部工作方式如此,所以我将其算作两件事。但说实话,仅仅缓存就足以让事情在一个末日场景中表现更好,我的 SMP 服务器最近就遇到了这样的场景,这是由于 Sophisticated Storage 处理带有软件包过滤器的软件包所致。
正则表达式(安全性)
我实际上知道已经有另一个模组允许你在软件包地址中使用正则表达式,但当我们 在 SMP 中尝试时,服务器几乎立即崩溃了。正则表达式实际上可能相当危险,所以我 加入了一些基本的安全措施,希望能阻止有人至少意外地用它们摧毁服务器。具体来说:
- 星号高度限制。 你知道正则表达式
(a+)+很危险吗? 这是因为所谓的灾难性回溯,Java 正则表达式库容易受到其影响。 事实上,不小心写出这样的表达式也并非不可能。我们会检查所有正则表达式的星号高度, 并在发现问题时阻止其运行。 - 重复次数限制。 情况没那么严重,但如果你试图连续匹配例如 1000 个 相同的内容,性能开始下降。这种情况本不该出现在软件包地址中,所以我们加了保护。
- 禁止反向引用。 正则表达式中的反向引用允许你说“匹配之前已经匹配过的内容”, 这很有用,但对于软件包地址来说可能无关紧要,而且速度较慢。默认情况下不允许使用。
我们还确保在通过 Create 的 Glob.toRegexPattern 方法解析每个正则表达式时进行测试,
尽管这通常不会编译表达式,只是将其从通配符模式转换为正则表达式。这很重要,因为
隐含的意思是该方法返回的所有正则表达式都应能无错误地编译。
更长的蛙口名称
正则表达式往往比通配符模式……大一些,这可能会成为青蛙的麻烦。因此,我们将 蛙口和邮箱的最大名称长度增加到了 100。……幸好你可以复制粘贴。
让你的库存管理员保持就座
让我为你设定一个场景。你正在一家蜂蜜店。库存管理员是一只蜜蜂。 你拿到购物清单准备结账,于是你点击库存管理员——哦不!你点中了座椅! 你刚坐下,蜜蜂便带着 newfound 自由飞向天空。你没有拴绳。你怎么把蜜蜂弄回座椅上? 飞行的生物最糟糕了。
这是一个简单的更改。如果你点击由库存管理员占据的座椅,什么都不会发生。 如果需要移除库存管理员,你可以破坏座椅或库存计时器。但至少你不会意外这么做。
An addition for Create 6 for Minecraft 1.20.1 and 1.21.1.
This mod aims to improve or expand several areas related to logistics with the Create mod.
Additions
Promise Limits (Factory Gauge Improvement)
We've all been there. You set up a new factory gauge, and request 100 stacks of whatever, only to find out that your production facility can't keep up and Create tried sending 1,000 packages worth of ingredients and now everything is awful.
Promise Limits are here to help. When configuring a factory gauge, you can now set a limit for how many promises it can have open at once. This allows you to, for example, limit it to only waiting for at most a stack of something at a time.
Your factory's logistics grid will thank you.
Additional Stock (Restocker Gauge Improvement)
Restockers are pretty cool, but something I don't like about them is how they stock to a specific value and as soon as so much as a single cobblestone is missing, they'll request the exact number needed to reach that value again. This can be a bit silly and wasteful. As such, additional stock! Say, for example, you have a Restocker that's set to keep one stack of cobblestone on hand. With this, you can tell the Restocker to request 8 additional stacks of items whenever the available quantity falls under the requested level (1 stack). Then, say the number of cobblestone in storage drops to 32. Half of a stack. Instead of requesting 32 cobblestone to get back up to one stack, it'll request 544 cobblestone. That's the missing 32, and 8 more stacks. Kind of like a Threshold Switch, but for restocking. And with a somewhat clunkier UI because of how the Restocker works.
Regular Expressions (Package Address Improvement)
Globs are nice, but sometimes they just lack a little something, right? Well, go
ahead and use regex if you dare. No, really. You can now. Just start your address
pattern with regex: (case-insensitive) and the rest of it will be treated as a
regular expression.
Cash Register (New Block, Stock Ticker-Like)
A new block that serves as an alternative to the Stock Ticker. Cash Registers are meant for use in shops specifically. They feature UIs for extracting items rather than right-clicking like the Stock Ticker. Additionally, they track all sales made through them in a Sales Ledger. Plus, they look neat!
As a little bonus, you can take the Sale Ledger out of a Cash Register and click a Stock Keeper with it to quickly select all the items you sold. Good for restocking your shop, if you're doing that manually. (This works just like a clipboard list of items for a Schematicannon.)
Package Accelerator (New Block, Packagers Go Zoom)
An auxiliary block to accompany Packagers, this block uses stress units to speed up the Packager in front of it. I use Sophisticated Storage for bulk storage of items, and as the system has grown, having a single packager has presented a bottleneck for sending items out. This is my solution, allowing packages to be sent out much quicker but at a cost.
Package Accelerators require at least 30 RPM to function.
Package Editor (New Block, Rename Packages)
A new package handling block. The Package Editor is similar to a Re-Packager, but rather than combining packages from the same order, it allows you to edit the addresses of packages using rules. Rules are input by either placing a sign next to the Package Editor, or by attaching a clipboard to the side of the Package Editor. Clipboards are recommended.
When writing rules for a Package Editor, the first line is the pattern to
match and the second line is the text to replace the match with. For example,
say you have packages being routed into a warehouse with the prefix Ware1-
and a full package name might be Ware1-Floor2-Storage. What if you want to
chop off the Ware1- once the package gets to your warehouse? That's easy,
just send the packages through a Package Editor with this pattern and a
blank replacement line:
Ware1-
The Package Editor will search each package name for Ware1- at the start,
and if it finds it, replace it with nothing. You could also write that like this:
Ware1-{*}
$1
So what's going on there? The Package Editor treats anything inside { and } as
a capture group. In other words, that text is saved and can be referenced in your
replacement text by adding a $ followed one you want. You can also use regular
expressions, of course, if you want to do something more advanced than globs
allow for.
Finally, there are two special behaviors you can manage if you're using a clipboard:
- If you check the box next to the pattern line, the pattern will be interpreted as case-insensitive.
- If you check the box next to the replacement line, then the Package Editor will stop after this rule (assuming this rule matched). You could use this, for example, to make a catch-all rule that sends packages to some Lost & Found if it doesn't match any other rules.
Train Network Monitor Peripheral (New Block, CC: Tweaked Only)
You know what's cool? Trains. You know what's cooler? Having some big cool wall of data about your trains. Arrivals, departures, the status of trains. And trains are pretty important for logistics, too. The Train Network Monitor is a single block that allows you to look up live data for any station and any train on a given train network. This includes everything the normal Train Station peripheral gives you, and additional events for train arrivals and departures. You can also see how many packages are in the system, and the status of every postbox attached to the various train stations.
If you're feeling particularly adventurous, you can enable optional features for viewing more details about train inventories and for read-write access to remote trains and stations. Want to update schedules on the fly using a computer? Be my guest. However, this is disabled by default because it seems a bit too unbalanced to me.
Short and Tall Seats (New Block, Basically... Seats?)
Err, seats aren't logistics? Whatever do you mean? You can, erm... sit on them, and—okay, fine. These are a bit out of scope for 'Additional Logistics', but there's a good reason we've added seats! Aesthetics, of course.
Depending on what kind of mob you choose for your Stock Keeper, the default seat isn't always at a good height for whatever build you're doing. As such, we've added Short Seats and Tall Seats. Short Seats are 2/16ths of a block tall, while Tall Seats are 14/16ths of a block tall. (Normal Seats are, of course, 8/16ths or 1/2 of a block tall.)
Lazy Shafts (New Block, Basically Shafts)
I know what you're thinking. This isn't logistics either. And Create has had shafts for years. Get it together, Khloe. But this is important, I promise. Lazy Shafts are my attempt at creating lag friendly shafts. Basically, normal shafts have a block entity for each individual block, right? These try to avoid that when possible. As long as you have more than two Lazy Shafts in a row, you're going to be coming out ahead on block entities. If you use a lot of shafts, and I mean a lot, then replacing them with these might help your server performance.
Flexible Lazy Shafts (New Block, Basically Gearboxes + Lazy Shafts + ???)
There are Flexible Lazy Shafts too. These are like Lazy Shafts, but they can connect in any direction. Not just that, but they have configurable sides. Just use your wrench on a side to expose a shaft. Use your wrench again to reverse the direction.
Just be careful when connecting things. Due to how they're connected in code, sometimes Create ends up breaking an inconvenient Flexible Lazy Shaft if there's a problem with incompatible rotations.
Did I mention Lazy Shafts, Flexible Lazy Shafts, and Lazy Cogs can be encased? They support Andesite Casing, Brass Casing, Copper Casing, Industrial Iron Block, and Weathered Iron Block. (Yes, I want to implement Train Casing, but it's actually a bit weird to do for some weird technical reasons, at least if I want the connected textures to work properly. It's coming Eventually™.)
Improvements
Address Matcher Optimization
Create's package address matching is just a little slow and unoptimized. This can be fine, but it can also cause issues when using Create with other mods. We're here to address the problem with a couple easy changes:
-
Cache the compiled matchers. Every package address is compiled into a regular expression when performing package matching. This involves first parsing the glob into regex, and then compiling the regex into a Java Pattern. All we have to do is cache that.
-
There are technically two caches because of how the internals of the package address system works, so I'm counting it as two things. But really, just caching was enough to make things work better in a doomsday scenario my SMP server saw recently thanks to Sophisticated Storage handling packages with package filters.
Regular Expressions (Safety)
I'm actually aware there was already another mod that let you do regex with package addresses, but when we tried that in our SMP the server was crashed by a player almost immediately. Regular expressions can actually be fairly dangerous, so I've included a few basic things that should hopefully stop someone from at least accidentally killing a server with them. Namely:
- Star Height Limit. Did you know the regular expression
(a+)+is dangerous? It's because of something called catastrophic backtracking, and the Java regular expression library is vulnerable to it. They're not impossible to write by accident for that matter. We check the star height of all regular expressions and prevent them from running if they're problematic. - Repetition Limit. It's not quite as bad, but if you try to match, say, 1000 of something in a row, the performance can start to drag. That should never come up for package addresses in the first place, so we put a protection on.
- No Backreferences. A backreference in regular expressions allows you to say "match this thing that was already matched", which can be useful, but it's also likely irrelevant for package addresses and it can be slow. They're disallowed by default.
We also make sure to test every regular expression at the moment it's parsed through
Create's Glob.toRegexPattern method, even though this doesn't normally compile the
expression, just convert it from a glob to regex. This is important because it's
implied that all regular expressions returned from this method should compile without
any errors.
Longer Frogport Names
Regular expressions tend to be a bit... bigger than globs, which could be a problem for frogs. As such, we've increased the maximum name length of frogports and postboxes to 100. ... it's a good thing you can copy and paste.
Let Your Stock Keepers Remain Seated
Let me set a scene for you. You're at a honey shop. The stock keeper is a bee. You get a shopping list and you're ready to check out, so you click on the stock keeper and-- oh no! You clicked the seat instead! You just sat down, and the bee took to the skies with newfound freedom. You don't have a lead. How are you supposed to get a bee back on a seat? Flying mobs are the worst.
This is a simple change. If you click on a seat occupied by a stock keeper, nothing will happen. If you need to dislodge the stock keeper, you can break the seat or the stock ticker. But at least you won't do it by accident.
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
下载 Create: Additional Logistics
大家好,很抱歉我有一段时间没有更新模组了。最近因为其他事情比较忙。这里提供了一些必要的修复内容。
已修复
- 修复了与其他修改 Create 中用于确定实体在装置座位上高度方法的模组的兼容性问题,例如 Another Furniture。
- 修复了与 Create: Factory Logistics 的兼容性问题,该问题会导致购买操作无法发送物品。作为此修复的结果,安装了 Factory Logistics 的用户将无法使用货币转换系统。
- 修复了正则表达式验证问题可能导致异常泄漏并在某些情况下导致崩溃的问题。感谢 GitHub 上的 chaoticunnatural!
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧