代理
简介
本模组添加了代理(Proxies)。什么是代理?代理是完全被动的方块,它们会锁定另一个方块并自身不执行任何操作。然而,当有东西尝试与代理的容器、流体罐或能量存储进行交互时,该交互会被透明地重定向到被锁定的方块上。
代理可以指向其他代理,形成链式结构。由于它们只是普通的方块,因此可以与使用标准能力(Capabilities)的任何东西配合工作:漏斗、管道、电缆、机器等。结合过滤代理,这使得构建物品传输和分类系统变得比通常情况更简单、更紧凑,而无需模组本身主动执行任何操作。

方块
代理有三种类型,分别对应三种标准能力类型:
- 物品代理 重定向物品处理器(容器)
- 流体代理 重定向流体处理器(流体罐)
- 能量代理 重定向能量存储(FE)
每种类型都有多种变体:
- 常规 代理始终访问其目标方块的侧面。
- 侧向保持 代理在与代理自身被访问相同的侧面上访问目标,保留如熔炉等机器的侧向特性。
- 无侧面 代理在……“方块的无侧面”上访问目标??(当未指定特定侧面时,方块暴露的内部无侧面视图。)
- 交汇 代理可以从任何侧面访问并穿过,允许多个代理链通过单个方块交叉。
- 过滤 代理(物品和流体)拥有一个小型图形用户界面,包含过滤槽和白名单/黑名单设置,限制可以通过的内容。
- 合并器 将两侧方块上的容器、流体罐或能量存储合并为一个大的整体。
配置
本模组有一个简单的服务器配置文件,包含 chain_length_limit(代理链的最大长度)和 banned_proxy_targets(禁止被指向的方块实体)。可以通过内置的配置屏幕在游戏内编辑(单人游戏中,或作为管理员),也可以实例文件夹中的 config 文件夹中编辑。
历史背景
物品代理最初是我为 Convenient Additions 实现的一项功能。它是一种在不自行执行太多操作的情况下显著简化物品传输的方式。
许可证
本模组根据 Unlicense 发布至公共领域。您可以随意处置它。
Proxies
About
This mod adds proxies. What are proxies? Proxies are completely passive blocks that target another block and do nothing on their own. However, when something tries to interact with a proxy's inventory, tank, or energy storage, the interaction is transparently redirected to the targeted block instead.
Proxies can target other proxies, forming chains, and since they are just plain blocks they work with anything that uses the standard capabilities: hoppers, pipes, cables, machines, and so on. Together with filtered proxies this makes it possible to build item transport and sorting systems that are much simpler and more compact than usual, without the mod actively doing anything itself.

The Blocks
Proxies come in three flavors, one for each of the standard capability types:
- Item Proxies redirect item handlers (inventories)
- Fluid Proxies redirect fluid handlers (tanks)
- Energy Proxies redirect energy storage (FE)
Each flavor comes in several variants:
- Regular proxies always access the side of the block they target.
- Side-Preserving proxies access the target on the same side the proxy itself was accessed from, preserving sidedness for machines like furnaces.
- Null-Sided proxies access the target on... "the null-side of the block"?? (The side-less internal view a block exposes when no particular side is asked for.)
- Junction proxies can be accessed from and pass through any side, allowing multiple proxy chains to cross through a single block.
- Filtered proxies (items and fluids) have a small GUI with filter slots and whitelist/blacklist settings, restricting what may pass through.
- Mergers combine the inventories, tanks, or energy storages of the two blocks on either side into one big one.
Configuration
The mod has a small server config with a chain_length_limit (how long proxy chains may get) and banned_proxy_targets (block entities that may not be targeted). It can be edited in-game via the built-in config screen (in singleplayer, or as an operator), or in the instance's config folder.
Legacy
Item Proxies were a feature I originally implemented for Convenient Additions. They are a way to simplify item transport significantly without doing much by themselves.
License
This mod is released into the public domain under the Unlicense. Do whatever you want with it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧